Fix redefinition of default argument, found by modules build. It's not
authorRichard Smith <richard-llvm@metafoo.co.uk>
Sun, 20 Apr 2014 20:26:39 +0000 (20:26 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Sun, 20 Apr 2014 20:26:39 +0000 (20:26 +0000)
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

utils/TableGen/IntrinsicEmitter.cpp

index 2dfa3641aa9d78a7d7efa454eeffe2b7321e4c8f..1927ad923699b319de9e31dd3ebb220e33282d07 100644 (file)
@@ -14,6 +14,7 @@
 #include "CodeGenIntrinsics.h"
 #include "CodeGenTarget.h"
 #include "SequenceToOffsetTable.h"
 #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"
 #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<CodeGenIntrinsic> &Ints,
   OS << "#endif\n\n";  // End of GET_INTRINSIC_GENERATOR_GLOBAL
 }
 
   OS << "#endif\n\n";  // End of GET_INTRINSIC_GENERATOR_GLOBAL
 }
 
+namespace {
 enum ModRefKind {
   MRK_none,
   MRK_readonly,
   MRK_readnone
 };
 enum ModRefKind {
   MRK_none,
   MRK_readonly,
   MRK_readnone
 };
+}
 
 static ModRefKind getModRefKind(const CodeGenIntrinsic &intrinsic) {
   switch (intrinsic.ModRef) {
 
 static ModRefKind getModRefKind(const CodeGenIntrinsic &intrinsic) {
   switch (intrinsic.ModRef) {
@@ -787,10 +790,6 @@ EmitIntrinsicToGCCBuiltinMap(const std::vector<CodeGenIntrinsic> &Ints,
   OS << "#endif\n\n";
 }
 
   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);
 }
   IntrinsicEmitter(RK, TargetOnly).run(OS);
 }
-
-} // End llvm namespace