registered when PCH wasn't being used. We should always install (in BuiltinInfo)
information about target-specific builtins, but we shouldn't register any builtin
identifier infos. This fixes the build of apps that use PCH and target specific
builtins together.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73492
91177308-0d34-0410-b5e6-
96231b3b80d8
GCC_ENABLE_CPP_RTTI = NO;
GCC_ENABLE_PASCAL_STRINGS = NO;
GCC_ENABLE_SYMBOL_SEPARATION = NO;
+ GCC_ENABLE_TRIGRAPHS = NO;
GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
GCC_INLINES_ARE_PRIVATE_EXTERN = NO;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
GCC_THREADSAFE_STATICS = NO;
GCC_USE_GCC3_PFE_SUPPORT = NO;
+ GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
INSTALL_PATH = "$(HOME)/bin";
OTHER_LDFLAGS = (
"-lLLVMBitWriter",
const Info *TSRecords;
unsigned NumTSRecords;
public:
- Context() : TSRecords(0), NumTSRecords(0) {}
+ Context(const TargetInfo &Target);
/// InitializeBuiltins - Mark the identifiers for all the builtins with their
/// appropriate builtin ID # and mark any non-portable builtin identifiers as
/// such.
- void InitializeBuiltins(IdentifierTable &Table, const TargetInfo &Target,
- bool NoBuiltins = false);
+ void InitializeBuiltins(IdentifierTable &Table, bool NoBuiltins = false);
/// \brief Popular the vector with the names of all of the builtins.
void GetBuiltinNames(llvm::SmallVectorImpl<const char *> &Names,
return TSRecords[ID - Builtin::FirstTSBuiltin];
}
+Builtin::Context::Context(const TargetInfo &Target) {
+ // Get the target specific builtins from the target.
+ Target.getTargetBuiltins(TSRecords, NumTSRecords);
+}
+
/// InitializeBuiltins - Mark the identifiers for all the builtins with their
/// appropriate builtin ID # and mark any non-portable builtin identifiers as
/// such.
void Builtin::Context::InitializeBuiltins(IdentifierTable &Table,
- const TargetInfo &Target,
bool NoBuiltins) {
// Step #1: mark all target-independent builtins with their ID's.
for (unsigned i = Builtin::NotBuiltin+1; i != Builtin::FirstTSBuiltin; ++i)
(!NoBuiltins || !strchr(BuiltinInfo[i].Attributes, 'f')))
Table.get(BuiltinInfo[i].Name).setBuiltinID(i);
- // Get the target specific builtins from the target.
- Target.getTargetBuiltins(TSRecords, NumTSRecords);
-
// Step #2: Register target-specific builtins.
for (unsigned i = 0, e = NumTSRecords; i != e; ++i)
if (!TSRecords[i].Suppressed &&
IdentifierInfoLookup* IILookup)
: Diags(&diags), Features(opts), Target(target),FileMgr(Headers.getFileMgr()),
SourceMgr(SM), HeaderInfo(Headers), Identifiers(opts, IILookup),
- CurPPLexer(0), CurDirLookup(0), Callbacks(0) {
+ BuiltinInfo(Target), CurPPLexer(0), CurDirLookup(0), Callbacks(0) {
ScratchBuf = new ScratchBuffer(SourceMgr);
CounterValue = 0; // __COUNTER__ starts at 0.
// Initialize builtin info.
PP->getBuiltinInfo().InitializeBuiltins(PP->getIdentifierTable(),
- PP->getTargetInfo(),
PP->getLangOptions().NoBuiltin);
}