From: Richard Smith Date: Sun, 20 Apr 2014 20:26:39 +0000 (+0000) Subject: Fix redefinition of default argument, found by modules build. It's not X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=8f5902164338c448b04985ff251f72a55e24ce0b;p=oota-llvm.git Fix redefinition of default argument, found by modules build. It's not entirely clear whether this should be valid with modules enabled, but the fixed code is cleaner regardless. Also fix a TU-local type that accidentally had external linkage. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206714 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/utils/TableGen/IntrinsicEmitter.cpp b/utils/TableGen/IntrinsicEmitter.cpp index 2dfa3641aa9..1927ad92369 100644 --- a/utils/TableGen/IntrinsicEmitter.cpp +++ b/utils/TableGen/IntrinsicEmitter.cpp @@ -14,6 +14,7 @@ #include "CodeGenIntrinsics.h" #include "CodeGenTarget.h" #include "SequenceToOffsetTable.h" +#include "TableGenBackends.h" #include "llvm/ADT/StringExtras.h" #include "llvm/TableGen/Error.h" #include "llvm/TableGen/Record.h" @@ -476,11 +477,13 @@ void IntrinsicEmitter::EmitGenerator(const std::vector &Ints, OS << "#endif\n\n"; // End of GET_INTRINSIC_GENERATOR_GLOBAL } +namespace { enum ModRefKind { MRK_none, MRK_readonly, MRK_readnone }; +} static ModRefKind getModRefKind(const CodeGenIntrinsic &intrinsic) { switch (intrinsic.ModRef) { @@ -787,10 +790,6 @@ EmitIntrinsicToGCCBuiltinMap(const std::vector &Ints, OS << "#endif\n\n"; } -namespace llvm { - -void EmitIntrinsics(RecordKeeper &RK, raw_ostream &OS, bool TargetOnly = false) { +void llvm::EmitIntrinsics(RecordKeeper &RK, raw_ostream &OS, bool TargetOnly) { IntrinsicEmitter(RK, TargetOnly).run(OS); } - -} // End llvm namespace