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
This commit is contained in:
Richard Smith 2014-04-20 20:26:39 +00:00
parent 8f5a7de1e6
commit 8f59021643

View File

@ -14,6 +14,7 @@
#include "CodeGenIntrinsics.h" #include "CodeGenIntrinsics.h"
#include "CodeGenTarget.h" #include "CodeGenTarget.h"
#include "SequenceToOffsetTable.h" #include "SequenceToOffsetTable.h"
#include "TableGenBackends.h"
#include "llvm/ADT/StringExtras.h" #include "llvm/ADT/StringExtras.h"
#include "llvm/TableGen/Error.h" #include "llvm/TableGen/Error.h"
#include "llvm/TableGen/Record.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 { enum ModRefKind {
MRK_none, MRK_none,
MRK_readonly, MRK_readonly,
MRK_readnone MRK_readnone
}; };
}
static ModRefKind getModRefKind(const CodeGenIntrinsic &intrinsic) { static ModRefKind getModRefKind(const CodeGenIntrinsic &intrinsic) {
switch (intrinsic.ModRef) { switch (intrinsic.ModRef) {
@ -787,10 +790,6 @@ EmitIntrinsicToGCCBuiltinMap(const std::vector<CodeGenIntrinsic> &Ints,
OS << "#endif\n\n"; OS << "#endif\n\n";
} }
namespace llvm { void llvm::EmitIntrinsics(RecordKeeper &RK, raw_ostream &OS, bool TargetOnly) {
void EmitIntrinsics(RecordKeeper &RK, raw_ostream &OS, bool TargetOnly = false) {
IntrinsicEmitter(RK, TargetOnly).run(OS); IntrinsicEmitter(RK, TargetOnly).run(OS);
} }
} // End llvm namespace