[cfe-commits] r47930 - in /cfe/trunk: AST/Builtins.cpp AST/TranslationUnit.cpp Basic/IdentifierTable.cpp Basic/TargetInfo.cpp Basic/Targets.cpp Driver/clang.cpp Lex/MacroInfo.cpp Lex/PPExpressions.cpp Lex/Preprocessor.cpp NOTES.txt Sema/SemaDecl.cpp include/clang/Basic/DiagnosticKinds.def include/clang/Basic/IdentifierTable.h include/clang/Basic/TargetInfo.h include/clang/Basic/TokenKinds.def include/clang/Lex/MacroInfo.h include/clang/Lex/Preprocessor.h test/Parser/portability.c
Chris Lattner
sabre at nondot.org
Tue Mar 4 17:18:20 PST 2008
Author: lattner
Date: Tue Mar 4 19:18:20 2008
New Revision: 47930
URL: http://llvm.org/viewvc/llvm-project?rev=47930&view=rev
Log:
Remove the first layer of support for "portability" warnings. This is
theoretically useful, but not useful in practice. It adds a bunch of
complexity, and not much value. It's best to nuke it. One big advantage
is that it means the target interfaces will soon lose their SLoc arguments
and target queries can never emit diagnostics anymore (yay). Removing this
also simplifies some of the core preprocessor which should make it slightly
faster.
Ted, I didn't simplify TripleProcessor, which can now have at most one
triple, and can probably just be removed. Please poke at it when you have
time.
Removed:
cfe/trunk/test/Parser/portability.c
Modified:
cfe/trunk/AST/Builtins.cpp
cfe/trunk/AST/TranslationUnit.cpp
cfe/trunk/Basic/IdentifierTable.cpp
cfe/trunk/Basic/TargetInfo.cpp
cfe/trunk/Basic/Targets.cpp
cfe/trunk/Driver/clang.cpp
cfe/trunk/Lex/MacroInfo.cpp
cfe/trunk/Lex/PPExpressions.cpp
cfe/trunk/Lex/Preprocessor.cpp
cfe/trunk/NOTES.txt
cfe/trunk/Sema/SemaDecl.cpp
cfe/trunk/include/clang/Basic/DiagnosticKinds.def
cfe/trunk/include/clang/Basic/IdentifierTable.h
cfe/trunk/include/clang/Basic/TargetInfo.h
cfe/trunk/include/clang/Basic/TokenKinds.def
cfe/trunk/include/clang/Lex/MacroInfo.h
cfe/trunk/include/clang/Lex/Preprocessor.h
Modified: cfe/trunk/AST/Builtins.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/AST/Builtins.cpp?rev=47930&r1=47929&r2=47930&view=diff
==============================================================================
--- cfe/trunk/AST/Builtins.cpp (original)
+++ cfe/trunk/AST/Builtins.cpp Tue Mar 4 19:18:20 2008
@@ -40,17 +40,12 @@
for (unsigned i = Builtin::NotBuiltin+1; i != Builtin::FirstTSBuiltin; ++i)
Table.get(BuiltinInfo[i].Name).setBuiltinID(i);
- // Step #2: handle target builtins.
- std::vector<const char *> NonPortableBuiltins;
- Target.getTargetBuiltins(TSRecords, NumTSRecords, NonPortableBuiltins);
+ // Step #2: Get target builtins.
+ Target.getTargetBuiltins(TSRecords, NumTSRecords);
- // Step #2a: Register target-specific builtins.
+ // Step #3: Register target-specific builtins.
for (unsigned i = 0, e = NumTSRecords; i != e; ++i)
Table.get(TSRecords[i].Name).setBuiltinID(i+Builtin::FirstTSBuiltin);
-
- // Step #2b: Mark non-portable builtins as such.
- for (unsigned i = 0, e = NonPortableBuiltins.size(); i != e; ++i)
- Table.get(NonPortableBuiltins[i]).setNonPortableBuiltin(true);
}
/// DecodeTypeFromStr - This decodes one type descriptor from Str, advancing the
Modified: cfe/trunk/AST/TranslationUnit.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/AST/TranslationUnit.cpp?rev=47930&r1=47929&r2=47930&view=diff
==============================================================================
--- cfe/trunk/AST/TranslationUnit.cpp (original)
+++ cfe/trunk/AST/TranslationUnit.cpp Tue Mar 4 19:18:20 2008
@@ -191,9 +191,7 @@
{ // Read the TargetInfo.
llvm::SerializedPtrID PtrID = Dezr.ReadPtrID();
char* triple = Dezr.ReadCStr(NULL,0,true);
- std::string Triple(triple);
- Dezr.RegisterPtr(PtrID,TargetInfo::CreateTargetInfo(&Triple,
- &Triple+1));
+ Dezr.RegisterPtr(PtrID,TargetInfo::CreateTargetInfo(std::string(triple)));
delete [] triple;
}
Modified: cfe/trunk/Basic/IdentifierTable.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Basic/IdentifierTable.cpp?rev=47930&r1=47929&r2=47930&view=diff
==============================================================================
--- cfe/trunk/Basic/IdentifierTable.cpp (original)
+++ cfe/trunk/Basic/IdentifierTable.cpp Tue Mar 4 19:18:20 2008
@@ -32,9 +32,7 @@
HasMacro = false;
IsExtension = false;
IsPoisoned = false;
- IsOtherTargetMacro = false;
IsCPPOperatorKeyword = false;
- IsNonPortableBuiltin = false;
FETokenInfo = 0;
}
@@ -203,8 +201,6 @@
CASE( 8, 'u', 'a', unassert);
CASE(12, 'i', 'c', include_next);
- CASE(13, 'd', 'f', define_target);
- CASE(19, 'd', 'f', define_other_target);
#undef CASE
#undef HASH
}
@@ -406,9 +402,7 @@
S.EmitBool(hasMacroDefinition());
S.EmitBool(isExtensionToken());
S.EmitBool(isPoisoned());
- S.EmitBool(isOtherTargetMacro());
S.EmitBool(isCPlusPlusOperatorKeyword());
- S.EmitBool(isNonPortableBuiltin());
// FIXME: FETokenInfo
}
@@ -419,9 +413,7 @@
setHasMacroDefinition(D.ReadBool());
setIsExtensionToken(D.ReadBool());
setIsPoisoned(D.ReadBool());
- setIsOtherTargetMacro(D.ReadBool());
setIsCPlusPlusOperatorKeyword(D.ReadBool());
- setNonPortableBuiltin(D.ReadBool());
// FIXME: FETokenInfo
}
Modified: cfe/trunk/Basic/TargetInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Basic/TargetInfo.cpp?rev=47930&r1=47929&r2=47930&view=diff
==============================================================================
--- cfe/trunk/Basic/TargetInfo.cpp (original)
+++ cfe/trunk/Basic/TargetInfo.cpp Tue Mar 4 19:18:20 2008
@@ -54,167 +54,28 @@
//===----------------------------------------------------------------------===//
TargetInfo::~TargetInfo() {
- delete PrimaryTarget;
- for (unsigned i = 0; i < SecondaryTargets.size(); ++i)
- delete SecondaryTargets[i];
+ delete Target;
}
const char* TargetInfo::getTargetTriple() const {
- return PrimaryTarget->getTargetTriple();
+ return Target->getTargetTriple();
}
const char *TargetInfo::getTargetPrefix() const {
- return PrimaryTarget->getTargetPrefix();
-}
-
-/// DiagnoseNonPortability - When a use of a non-portable target feature is
-/// used, this method emits the diagnostic and marks the translation unit as
-/// non-portable.
-void TargetInfo::DiagnoseNonPortability(FullSourceLoc Loc,
- unsigned DiagKind) {
- NonPortable = true;
- if (Diag && Loc.isValid()) Diag->Report(Loc, DiagKind);
-}
-
-/// GetTargetDefineMap - Get the set of target #defines in an associative
-/// collection for easy lookup.
-static void GetTargetDefineMap(const TargetInfoImpl *Target,
- llvm::StringMap<std::string> &Map) {
- std::vector<char> Defines;
- Defines.reserve(4096);
- Target->getTargetDefines(Defines);
-
- for (const char *DefStr = &Defines[0], *E = DefStr+Defines.size();
- DefStr != E;) {
- // Skip the '#define ' portion.
- assert(memcmp(DefStr, "#define ", strlen("#define ")) == 0 &&
- "#define didn't start with #define!");
- DefStr += strlen("#define ");
-
- // Find the divider between the key and value.
- const char *SpacePos = strchr(DefStr, ' ');
-
- std::string &Entry = Map.GetOrCreateValue(DefStr, SpacePos).getValue();
-
- const char *EndPos = strchr(SpacePos+1, '\n');
- Entry = std::string(SpacePos+1, EndPos);
- DefStr = EndPos+1;
- }
+ return Target->getTargetPrefix();
}
/// getTargetDefines - Appends the target-specific #define values for this
/// target set to the specified buffer.
void TargetInfo::getTargetDefines(std::vector<char> &Buffer) {
- // If we have no secondary targets, be a bit more efficient.
- if (SecondaryTargets.empty()) {
- PrimaryTarget->getTargetDefines(Buffer);
- return;
- }
-
- // This is tricky in the face of secondary targets. Specifically,
- // target-specific #defines that are present and identical across all
- // secondary targets are turned into #defines, #defines that are present in
- // the primary target but are missing or different in the secondary targets
- // are turned into #define_target, and #defines that are not defined in the
- // primary, but are defined in a secondary are turned into
- // #define_other_target. This allows the preprocessor to correctly track uses
- // of target-specific macros.
-
- // Get the set of primary #defines.
- llvm::StringMap<std::string> PrimaryDefines;
- GetTargetDefineMap(PrimaryTarget, PrimaryDefines);
-
- // Get the sets of secondary #defines.
- llvm::StringMap<std::string> *SecondaryDefines
- = new llvm::StringMap<std::string>[SecondaryTargets.size()];
- for (unsigned i = 0, e = SecondaryTargets.size(); i != e; ++i)
- GetTargetDefineMap(SecondaryTargets[i], SecondaryDefines[i]);
-
- // Loop over all defines in the primary target, processing them until we run
- // out.
- for (llvm::StringMap<std::string>::iterator PDI =
- PrimaryDefines.begin(), E = PrimaryDefines.end(); PDI != E; ++PDI) {
- std::string DefineName(PDI->getKeyData(),
- PDI->getKeyData() + PDI->getKeyLength());
- std::string DefineValue = PDI->getValue();
-
- // Check to see whether all secondary targets have this #define and whether
- // it is to the same value. Remember if not, but remove the #define from
- // their collection in any case if they have it.
- bool isPortable = true;
-
- for (unsigned i = 0, e = SecondaryTargets.size(); i != e; ++i) {
- llvm::StringMap<std::string>::iterator I =
- SecondaryDefines[i].find(&DefineName[0],
- &DefineName[0]+DefineName.size());
- if (I == SecondaryDefines[i].end()) {
- // Secondary target doesn't have this #define.
- isPortable = false;
- } else {
- // Secondary target has this define, remember if it disagrees.
- if (isPortable)
- isPortable = I->getValue() == DefineValue;
- // Remove it from the secondary target unconditionally.
- SecondaryDefines[i].erase(I);
- }
- }
-
- // If this define is non-portable, turn it into #define_target, otherwise
- // just use #define.
- const char *Command = isPortable ? "#define " : "#define_target ";
- Buffer.insert(Buffer.end(), Command, Command+strlen(Command));
-
- // Insert "defname defvalue\n".
- Buffer.insert(Buffer.end(), DefineName.begin(), DefineName.end());
- Buffer.push_back(' ');
- Buffer.insert(Buffer.end(), DefineValue.begin(), DefineValue.end());
- Buffer.push_back('\n');
- }
-
- // Now that all of the primary target's defines have been handled and removed
- // from the secondary target's define sets, go through the remaining secondary
- // target's #defines and taint them.
- for (unsigned i = 0, e = SecondaryTargets.size(); i != e; ++i) {
- llvm::StringMap<std::string> &Defs = SecondaryDefines[i];
- while (!Defs.empty()) {
- const char *DefStart = Defs.begin()->getKeyData();
- const char *DefEnd = DefStart + Defs.begin()->getKeyLength();
-
- // Insert "#define_other_target defname".
- const char *Command = "#define_other_target ";
- Buffer.insert(Buffer.end(), Command, Command+strlen(Command));
- Buffer.insert(Buffer.end(), DefStart, DefEnd);
- Buffer.push_back('\n');
-
- // If any other secondary targets have this same define, remove it from
- // them to avoid duplicate #define_other_target directives.
- for (unsigned j = i+1; j != e; ++j) {
- llvm::StringMap<std::string>::iterator I =
- SecondaryDefines[j].find(DefStart, DefEnd);
- if (I != SecondaryDefines[j].end())
- SecondaryDefines[j].erase(I);
- }
- Defs.erase(Defs.begin());
- }
- }
-
- delete[] SecondaryDefines;
+ Target->getTargetDefines(Buffer);
}
/// ComputeWCharWidth - Determine the width of the wchar_t type for the primary
/// target, diagnosing whether this is non-portable across the secondary
/// targets.
void TargetInfo::ComputeWCharInfo(FullSourceLoc Loc) {
- PrimaryTarget->getWCharInfo(WCharWidth, WCharAlign);
-
- // Check whether this is portable across the secondary targets if the T-U is
- // portable so far.
- for (unsigned i = 0, e = SecondaryTargets.size(); i != e; ++i) {
- unsigned Width, Align;
- SecondaryTargets[i]->getWCharInfo(Width, Align);
- if (Width != WCharWidth || Align != WCharAlign)
- return DiagnoseNonPortability(Loc, diag::port_wchar_t);
- }
+ Target->getWCharInfo(WCharWidth, WCharAlign);
}
@@ -222,69 +83,18 @@
/// the current primary target, and info about which builtins are non-portable
/// across the current set of primary and secondary targets.
void TargetInfo::getTargetBuiltins(const Builtin::Info *&Records,
- unsigned &NumRecords,
- std::vector<const char *> &NPortable) const {
+ unsigned &NumRecords) const {
// Get info about what actual builtins we will expose.
- PrimaryTarget->getTargetBuiltins(Records, NumRecords);
- if (SecondaryTargets.empty()) return;
-
- // Compute the set of non-portable builtins.
-
- // Start by computing a mapping from the primary target's builtins to their
- // info records for efficient lookup.
- llvm::StringMap<const Builtin::Info*> PrimaryRecs;
- for (unsigned i = 0, e = NumRecords; i != e; ++i) {
- const char *BIName = Records[i].Name;
- PrimaryRecs.GetOrCreateValue(BIName, BIName+strlen(BIName)).getValue()
- = Records+i;
- }
-
- for (unsigned i = 0, e = SecondaryTargets.size(); i != e; ++i) {
- // Get the builtins for this secondary target.
- const Builtin::Info *Records2nd;
- unsigned NumRecords2nd;
- SecondaryTargets[i]->getTargetBuiltins(Records2nd, NumRecords2nd);
-
- // Remember all of the secondary builtin names.
- std::set<std::string> BuiltinNames2nd;
-
- for (unsigned j = 0, e = NumRecords2nd; j != e; ++j) {
- BuiltinNames2nd.insert(Records2nd[j].Name);
-
- // Check to see if the primary target has this builtin.
- llvm::StringMap<const Builtin::Info*>::iterator I =
- PrimaryRecs.find(Records2nd[j].Name,
- Records2nd[j].Name+strlen(Records2nd[j].Name));
- if (I != PrimaryRecs.end()) {
- const Builtin::Info *PrimBI = I->getValue();
- // If does. If they are not identical, mark the builtin as being
- // non-portable.
- if (Records2nd[j] != *PrimBI)
- NPortable.push_back(PrimBI->Name);
- } else {
- // The primary target doesn't have this, it is non-portable.
- NPortable.push_back(Records2nd[j].Name);
- }
- }
-
- // Now that we checked all the secondary builtins, check to see if the
- // primary target has any builtins that the secondary one doesn't. If so,
- // then those are non-portable.
- for (unsigned j = 0, e = NumRecords; j != e; ++j) {
- if (!BuiltinNames2nd.count(Records[j].Name))
- NPortable.push_back(Records[j].Name);
- }
- }
+ Target->getTargetBuiltins(Records, NumRecords);
}
/// getVAListDeclaration - Return the declaration to use for
/// __builtin_va_list, which is target-specific.
const char *TargetInfo::getVAListDeclaration() const {
- return PrimaryTarget->getVAListDeclaration();
+ return Target->getVAListDeclaration();
}
-static void removeGCCRegisterPrefix(const char *&Name)
-{
+static void removeGCCRegisterPrefix(const char *&Name) {
if (Name[0] == '%' || Name[0] == '#')
Name++;
}
@@ -304,7 +114,7 @@
strcmp(Name, "cc") == 0)
return true;
- PrimaryTarget->getGCCRegNames(Names, NumNames);
+ Target->getGCCRegNames(Names, NumNames);
// If we have a number it maps to an entry in the register name array.
if (isdigit(Name[0])) {
@@ -324,7 +134,7 @@
const TargetInfoImpl::GCCRegAlias *Aliases;
unsigned NumAliases;
- PrimaryTarget->getGCCRegAliases(Aliases, NumAliases);
+ Target->getGCCRegAliases(Aliases, NumAliases);
for (unsigned i = 0; i < NumAliases; i++) {
for (unsigned j = 0 ; j < llvm::array_lengthof(Aliases[i].Aliases); j++) {
if (!Aliases[i].Aliases[j])
@@ -346,7 +156,7 @@
const char * const *Names;
unsigned NumNames;
- PrimaryTarget->getGCCRegNames(Names, NumNames);
+ Target->getGCCRegNames(Names, NumNames);
// First, check if we have a number.
if (isdigit(Name[0])) {
@@ -363,7 +173,7 @@
const TargetInfoImpl::GCCRegAlias *Aliases;
unsigned NumAliases;
- PrimaryTarget->getGCCRegAliases(Aliases, NumAliases);
+ Target->getGCCRegAliases(Aliases, NumAliases);
for (unsigned i = 0; i < NumAliases; i++) {
for (unsigned j = 0 ; j < llvm::array_lengthof(Aliases[i].Aliases); j++) {
if (!Aliases[i].Aliases[j])
@@ -392,7 +202,7 @@
while (*Name) {
switch (*Name) {
default:
- if (!PrimaryTarget->validateAsmConstraint(*Name, info)) {
+ if (!Target->validateAsmConstraint(*Name, info)) {
// FIXME: This assert is in place temporarily
// so we can add more constraints as we hit it.
// Eventually, an unknown constraint should just be treated as 'g'.
@@ -431,7 +241,7 @@
// Check if matching constraint is out of bounds.
if (i >= NumOutputs)
return false;
- } else if (!PrimaryTarget->validateAsmConstraint(*Name, info)) {
+ } else if (!Target->validateAsmConstraint(*Name, info)) {
// FIXME: This assert is in place temporarily
// so we can add more constraints as we hit it.
// Eventually, an unknown constraint should just be treated as 'g'.
@@ -461,12 +271,11 @@
}
std::string TargetInfo::convertConstraint(const char Constraint) const {
- return PrimaryTarget->convertConstraint(Constraint);
+ return Target->convertConstraint(Constraint);
}
-const char *TargetInfo::getClobbers() const
-{
- return PrimaryTarget->getClobbers();
+const char *TargetInfo::getClobbers() const {
+ return Target->getClobbers();
}
Modified: cfe/trunk/Basic/Targets.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Basic/Targets.cpp?rev=47930&r1=47929&r2=47930&view=diff
==============================================================================
--- cfe/trunk/Basic/Targets.cpp (original)
+++ cfe/trunk/Basic/Targets.cpp Tue Mar 4 19:18:20 2008
@@ -776,54 +776,27 @@
TT[4] == '-' && TT[1] - '3' < 6);
}
-/// CreateTarget - Create the TargetInfoImpl object for the specified target
-/// enum value.
-static TargetInfoImpl *CreateTarget(const std::string& T) {
+/// CreateTargetInfo - Return the target info object for the specified target
+/// triple.
+TargetInfo* TargetInfo::CreateTargetInfo(const std::string &T) {
if (T.find("ppc-") == 0 || T.find("powerpc-") == 0)
- return new DarwinPPCTargetInfo(T);
- else if (T.find("ppc64-") == 0 || T.find("powerpc64-") == 0)
- return new DarwinPPC64TargetInfo(T);
- else if (T.find("sparc-") == 0)
- return new SolarisSparcV8TargetInfo(T); // ugly hack
- else if (T.find("x86_64-") == 0)
- return new DarwinX86_64TargetInfo(T);
- else if (IsX86(T))
- return new DarwinI386TargetInfo(T);
- else if (T.find("bogusW16W16-") == 0) // For testing portability.
- return new LinuxTargetInfo(T);
- else
- return NULL;
-}
-
-/// CreateTargetInfo - Return the set of target info objects as specified by
-/// the -arch command line option.
-TargetInfo* TargetInfo::CreateTargetInfo(const std::string* TriplesStart,
- const std::string* TriplesEnd,
- Diagnostic *Diags) {
-
- // Create the primary target and target info.
- TargetInfoImpl* PrimaryTarget = CreateTarget(*TriplesStart);
-
- if (!PrimaryTarget)
- return NULL;
+ return new TargetInfo(new DarwinPPCTargetInfo(T));
- TargetInfo *TI = new TargetInfo(PrimaryTarget, Diags);
+ if (T.find("ppc64-") == 0 || T.find("powerpc64-") == 0)
+ return new TargetInfo(new DarwinPPC64TargetInfo(T));
- // Add all secondary targets.
- for (const std::string* I=TriplesStart+1; I != TriplesEnd; ++I) {
- TargetInfoImpl* SecondaryTarget = CreateTarget(*I);
-
- if (!SecondaryTarget) {
- fprintf (stderr,
- "Warning: secondary target '%s' unrecognized.\n",
- I->c_str());
-
- continue;
- }
-
- TI->AddSecondaryTarget(SecondaryTarget);
- }
+ if (T.find("sparc-") == 0)
+ return new TargetInfo(new SolarisSparcV8TargetInfo(T)); // ugly hack
+
+ if (T.find("x86_64-") == 0)
+ return new TargetInfo(new DarwinX86_64TargetInfo(T));
+
+ if (IsX86(T))
+ return new TargetInfo(new DarwinI386TargetInfo(T));
+
+ if (T.find("bogusW16W16-") == 0) // For testing portability.
+ return new TargetInfo(new LinuxTargetInfo(T));
- return TI;
+ return NULL;
}
Modified: cfe/trunk/Driver/clang.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Driver/clang.cpp?rev=47930&r1=47929&r2=47930&view=diff
==============================================================================
--- cfe/trunk/Driver/clang.cpp (original)
+++ cfe/trunk/Driver/clang.cpp Tue Mar 4 19:18:20 2008
@@ -466,7 +466,7 @@
TargetTriple("triple",
llvm::cl::desc("Specify target triple (e.g. i686-apple-darwin9)."));
-static llvm::cl::list<std::string>
+static llvm::cl::opt<std::string>
Archs("arch",
llvm::cl::desc("Specify target architecture (e.g. i686)."));
@@ -518,9 +518,9 @@
// host-triple with no archs or using a specified target triple.
if (!TargetTriple.getValue().empty() || Archs.empty())
tp.addTriple(Triple);
-
- for (unsigned i = 0, e = Archs.size(); i !=e; ++i)
- tp.addTriple(Archs[i] + "-" + suffix);
+
+ if (!Archs.empty())
+ tp.addTriple(Archs + "-" + suffix);
}
//===----------------------------------------------------------------------===//
@@ -1307,14 +1307,9 @@
// Get information about the targets being compiled for. Note that this
// pointer and the TargetInfoImpl objects are never deleted by this toy
// driver.
- TargetInfo *Target;
-
- // Create triples, and create the TargetInfo.
std::vector<std::string> triples;
CreateTargetTriples(triples);
- Target = TargetInfo::CreateTargetInfo(&triples[0],
- &triples[0]+triples.size(),
- &Diags);
+ TargetInfo *Target = TargetInfo::CreateTargetInfo(triples[0]);
if (Target == 0) {
fprintf(stderr, "Sorry, I don't know what target this is: %s\n",
Modified: cfe/trunk/Lex/MacroInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Lex/MacroInfo.cpp?rev=47930&r1=47929&r2=47930&view=diff
==============================================================================
--- cfe/trunk/Lex/MacroInfo.cpp (original)
+++ cfe/trunk/Lex/MacroInfo.cpp Tue Mar 4 19:18:20 2008
@@ -20,7 +20,6 @@
IsC99Varargs = false;
IsGNUVarargs = false;
IsBuiltinMacro = false;
- IsTargetSpecific = false;
IsDisabled = false;
IsUsed = true;
@@ -32,8 +31,6 @@
/// this macro in spelling, arguments, and whitespace. This is used to emit
/// duplicate definition warnings. This implements the rules in C99 6.10.3.
///
-/// Note that this intentionally does not check isTargetSpecific for matching.
-///
bool MacroInfo::isIdenticalTo(const MacroInfo &Other, Preprocessor &PP) const {
// Check # tokens in replacement, number of args, and various flags all match.
if (ReplacementTokens.size() != Other.ReplacementTokens.size() ||
Modified: cfe/trunk/Lex/PPExpressions.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Lex/PPExpressions.cpp?rev=47930&r1=47929&r2=47930&view=diff
==============================================================================
--- cfe/trunk/Lex/PPExpressions.cpp (original)
+++ cfe/trunk/Lex/PPExpressions.cpp Tue Mar 4 19:18:20 2008
@@ -108,23 +108,6 @@
if (Result != 0 && ValueLive) {
MacroInfo *Macro = PP.getMacroInfo(II);
Macro->setIsUsed(true);
-
- // If this is the first use of a target-specific macro, warn about it.
- if (Macro->isTargetSpecific()) {
- // Don't warn on second use.
- Macro->setIsTargetSpecific(false);
- PP.getTargetInfo().DiagnoseNonPortability(
- PP.getFullLoc(PeekTok.getLocation()),
- diag::port_target_macro_use);
- }
- } else if (ValueLive) {
- // Use of a target-specific macro for some other target? If so, warn.
- if (II->isOtherTargetMacro()) {
- II->setIsOtherTargetMacro(false); // Don't warn on second use.
- PP.getTargetInfo().DiagnoseNonPortability(
- PP.getFullLoc(PeekTok.getLocation()),
- diag::port_target_macro_use);
- }
}
// Consume identifier.
Modified: cfe/trunk/Lex/Preprocessor.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Lex/Preprocessor.cpp?rev=47930&r1=47929&r2=47930&view=diff
==============================================================================
--- cfe/trunk/Lex/Preprocessor.cpp (original)
+++ cfe/trunk/Lex/Preprocessor.cpp Tue Mar 4 19:18:20 2008
@@ -808,13 +808,6 @@
return false;
}
- // If this is the first use of a target-specific macro, warn about it.
- if (MI->isTargetSpecific()) {
- MI->setIsTargetSpecific(false); // Don't warn on second use.
- getTargetInfo().DiagnoseNonPortability(getFullLoc(Identifier.getLocation()),
- diag::port_target_macro_use);
- }
-
/// Args - If this is a function-like macro expansion, this contains,
/// for each macro argument, the list of tokens that were provided to the
/// invocation.
@@ -1242,14 +1235,6 @@
Identifier.setFlag(Token::DisableExpand);
}
}
- } else if (II.isOtherTargetMacro() && !DisableMacroExpansion) {
- // If this identifier is a macro on some other target, emit a diagnostic.
- // This diagnosic is only emitted when macro expansion is enabled, because
- // the macro would not have been expanded for the other target either.
- II.setIsOtherTargetMacro(false); // Don't warn on second use.
- getTargetInfo().DiagnoseNonPortability(getFullLoc(Identifier.getLocation()),
- diag::port_target_macro_use);
-
}
// C++ 2.11p2: If this is an alternative representation of a C++ operator,
@@ -1775,7 +1760,7 @@
// C99 6.10.3 - Macro Replacement.
case tok::pp_define:
- return HandleDefineDirective(Result, false);
+ return HandleDefineDirective(Result);
case tok::pp_undef:
return HandleUndefDirective(Result);
@@ -1812,12 +1797,6 @@
case tok::pp_unassert:
//isExtension = true; // FIXME: implement #unassert
break;
-
- // clang extensions.
- case tok::pp_define_target:
- return HandleDefineDirective(Result, true);
- case tok::pp_define_other_target:
- return HandleDefineOtherTargetDirective(Result);
}
break;
}
@@ -2176,11 +2155,8 @@
}
/// HandleDefineDirective - Implements #define. This consumes the entire macro
-/// line then lets the caller lex the next real token. If 'isTargetSpecific' is
-/// true, then this is a "#define_target", otherwise this is a "#define".
-///
-void Preprocessor::HandleDefineDirective(Token &DefineTok,
- bool isTargetSpecific) {
+/// line then lets the caller lex the next real token.
+void Preprocessor::HandleDefineDirective(Token &DefineTok) {
++NumDefined;
Token MacroNameTok;
@@ -2196,11 +2172,6 @@
// Create the new macro.
MacroInfo *MI = new MacroInfo(MacroNameTok.getLocation());
- if (isTargetSpecific) MI->setIsTargetSpecific();
-
- // If the identifier is an 'other target' macro, clear this bit.
- MacroNameTok.getIdentifierInfo()->setIsOtherTargetMacro(false);
-
Token Tok;
LexUnexpandedToken(Tok);
@@ -2337,30 +2308,6 @@
setMacroInfo(MacroNameTok.getIdentifierInfo(), MI);
}
-/// HandleDefineOtherTargetDirective - Implements #define_other_target.
-void Preprocessor::HandleDefineOtherTargetDirective(Token &Tok) {
- Token MacroNameTok;
- ReadMacroName(MacroNameTok, 1);
-
- // Error reading macro name? If so, diagnostic already issued.
- if (MacroNameTok.is(tok::eom))
- return;
-
- // Check to see if this is the last token on the #undef line.
- CheckEndOfDirective("#define_other_target");
-
- // If there is already a macro defined by this name, turn it into a
- // target-specific define.
- if (MacroInfo *MI = getMacroInfo(MacroNameTok.getIdentifierInfo())) {
- MI->setIsTargetSpecific(true);
- return;
- }
-
- // Mark the identifier as being a macro on some other target.
- MacroNameTok.getIdentifierInfo()->setIsOtherTargetMacro();
-}
-
-
/// HandleUndefDirective - Implements #undef.
///
void Preprocessor::HandleUndefDirective(Token &UndefTok) {
@@ -2379,9 +2326,6 @@
// Okay, we finally have a valid identifier to undef.
MacroInfo *MI = getMacroInfo(MacroNameTok.getIdentifierInfo());
- // #undef untaints an identifier if it were marked by define_other_target.
- MacroNameTok.getIdentifierInfo()->setIsOtherTargetMacro(false);
-
// If the macro is not defined, this is a noop undef, just return.
if (MI == 0) return;
@@ -2436,26 +2380,8 @@
MacroInfo *MI = getMacroInfo(MII);
// If there is a macro, process it.
- if (MI) {
- // Mark it used.
+ if (MI) // Mark it used.
MI->setIsUsed(true);
-
- // If this is the first use of a target-specific macro, warn about it.
- if (MI->isTargetSpecific()) {
- MI->setIsTargetSpecific(false); // Don't warn on second use.
- getTargetInfo().DiagnoseNonPortability(
- getFullLoc(MacroNameTok.getLocation()),
- diag::port_target_macro_use);
- }
- } else {
- // Use of a target-specific macro for some other target? If so, warn.
- if (MII->isOtherTargetMacro()) {
- MII->setIsOtherTargetMacro(false); // Don't warn on second use.
- getTargetInfo().DiagnoseNonPortability(
- getFullLoc(MacroNameTok.getLocation()),
- diag::port_target_macro_use);
- }
- }
// Should we include the stuff contained by this directive?
if (!MI == isIfndef) {
Modified: cfe/trunk/NOTES.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/NOTES.txt?rev=47930&r1=47929&r2=47930&view=diff
==============================================================================
--- cfe/trunk/NOTES.txt (original)
+++ cfe/trunk/NOTES.txt Tue Mar 4 19:18:20 2008
@@ -6,27 +6,6 @@
http://david.tribble.com/text/cdiffs.htm
//===---------------------------------------------------------------------===//
-Extensions:
-
- * "#define_target X Y"
- This preprocessor directive works exactly the same was as #define, but it
- notes that 'X' is a target-specific preprocessor directive. When used, a
- diagnostic is emitted indicating that the translation unit is non-portable.
-
- If a target-define is #undef'd before use, no diagnostic is emitted. If 'X'
- were previously a normal #define macro, the macro is tainted. If 'X' is
- subsequently #defined as a non-target-specific define, the taint bit is
- cleared.
-
- * "#define_other_target X"
- The preprocessor directive takes a single identifier argument. It notes
- that this identifier is a target-specific #define for some target other than
- the current one. Use of this identifier will result in a diagnostic.
-
- If 'X' is later #undef'd or #define'd, the taint bit is cleared. If 'X' is
- already defined, X is marked as a target-specific define.
-
-//===---------------------------------------------------------------------===//
To time GCC preprocessing speed without output, use:
"time gcc -MM file"
@@ -159,102 +138,3 @@
ppc64-apple-darwin9 (secondary target)
The secondary targets are used in the 'portability' model (see below).
-
-//===---------------------------------------------------------------------===//
-
-The 'portability' model in clang is sufficient to catch translation units (or
-their parts) that are not portable, but it doesn't help if the system headers
-are non-portable and not fixed. An alternative model that would be easy to use
-is a 'tainting' scheme. Consider:
-
-int32_t
-OSHostByteOrder(void) {
-#if defined(__LITTLE_ENDIAN__)
- return OSLittleEndian;
-#elif defined(__BIG_ENDIAN__)
- return OSBigEndian;
-#else
- return OSUnknownByteOrder;
-#endif
-}
-
-It would be trivial to mark 'OSHostByteOrder' as being non-portable (tainted)
-instead of marking the entire translation unit. Then, if OSHostByteOrder is
-never called/used by the current translation unit, the t-u wouldn't be marked
-non-portable. However, there is no good way to handle stuff like:
-
-extern int X, Y;
-
-#ifndef __POWERPC__
-#define X Y
-#endif
-
-int bar() { return X; }
-
-When compiling for powerpc, the #define is skipped, so it doesn't know that bar
-uses a #define that is set on some other target. In practice, limited cases
-could be handled by scanning the skipped region of a #if, but the fully general
-case cannot be implemented efficiently. In this case, for example, the #define
-in the protected region could be turned into either a #define_target or
-#define_other_target as appropriate. The harder case is code like this (from
-OSByteOrder.h):
-
- #if (defined(__ppc__) || defined(__ppc64__))
- #include <libkern/ppc/OSByteOrder.h>
- #elif (defined(__i386__) || defined(__x86_64__))
- #include <libkern/i386/OSByteOrder.h>
- #else
- #include <libkern/machine/OSByteOrder.h>
- #endif
-
-The realistic way to fix this is by having an initial #ifdef __llvm__ that
-defines its contents in terms of the llvm bswap intrinsics. Other things should
-be handled on a case-by-case basis.
-
-
-We probably have to do something smarter like this in the future. The C++ header
-<limits> contains a lot of code like this:
-
- static const int digits10 = __LDBL_DIG__;
- static const int min_exponent = __LDBL_MIN_EXP__;
- static const int min_exponent10 = __LDBL_MIN_10_EXP__;
- static const float_denorm_style has_denorm
- = bool(__LDBL_DENORM_MIN__) ? denorm_present : denorm_absent;
-
- ... since this isn't being used in an #ifdef, it should be easy enough to taint
-the decl for these ivars.
-
-
-/usr/include/sys/cdefs.h contains stuff like this:
-
-#if defined(__ppc__)
-# if defined(__LDBL_MANT_DIG__) && defined(__DBL_MANT_DIG__) && \
- __LDBL_MANT_DIG__ > __DBL_MANT_DIG__
-# if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__-0 < 1040
-# define __DARWIN_LDBL_COMPAT(x) __asm("_" __STRING(x) "$LDBLStub")
-# else
-# define __DARWIN_LDBL_COMPAT(x) __asm("_" __STRING(x) "$LDBL128")
-# endif
-# define __DARWIN_LDBL_COMPAT2(x) __asm("_" __STRING(x) "$LDBL128")
-# define __DARWIN_LONG_DOUBLE_IS_DOUBLE 0
-# else
-# define __DARWIN_LDBL_COMPAT(x) /* nothing */
-# define __DARWIN_LDBL_COMPAT2(x) /* nothing */
-# define __DARWIN_LONG_DOUBLE_IS_DOUBLE 1
-# endif
-#elif defined(__i386__) || defined(__ppc64__) || defined(__x86_64__)
-# define __DARWIN_LDBL_COMPAT(x) /* nothing */
-# define __DARWIN_LDBL_COMPAT2(x) /* nothing */
-# define __DARWIN_LONG_DOUBLE_IS_DOUBLE 0
-#else
-# error Unknown architecture
-#endif
-
-An ideal way to solve this issue is to mark __DARWIN_LDBL_COMPAT /
-__DARWIN_LDBL_COMPAT2 / __DARWIN_LONG_DOUBLE_IS_DOUBLE as being non-portable
-because they depend on non-portable macros. In practice though, this may end
-up being a serious problem: every use of printf will mark the translation unit
-non-portable if targetting ppc32 and something else.
-
-//===---------------------------------------------------------------------===//
-
Modified: cfe/trunk/Sema/SemaDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Sema/SemaDecl.cpp?rev=47930&r1=47929&r2=47930&view=diff
==============================================================================
--- cfe/trunk/Sema/SemaDecl.cpp (original)
+++ cfe/trunk/Sema/SemaDecl.cpp Tue Mar 4 19:18:20 2008
@@ -135,15 +135,6 @@
// corresponds to a compiler builtin, create the decl object for the builtin
// now, injecting it into translation unit scope, and return it.
if (NS == Decl::IDNS_Ordinary) {
- // If this is a builtin on some other target, or if this builtin varies
- // across targets (e.g. in type), emit a diagnostic and mark the translation
- // unit non-portable for using it.
- if (II->isNonPortableBuiltin()) {
- // Only emit this diagnostic once for this builtin.
- II->setNonPortableBuiltin(false);
- Context.Target.DiagnoseNonPortability(Context.getFullLoc(IdLoc),
- diag::port_target_builtin_use);
- }
// If this is a builtin on this (or all) targets, create the decl.
if (unsigned BuiltinID = II->getBuiltinID())
return LazilyCreateBuiltin(II, BuiltinID, S);
Modified: cfe/trunk/include/clang/Basic/DiagnosticKinds.def
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticKinds.def?rev=47930&r1=47929&r2=47930&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/DiagnosticKinds.def (original)
+++ cfe/trunk/include/clang/Basic/DiagnosticKinds.def Tue Mar 4 19:18:20 2008
@@ -20,19 +20,6 @@
// ERROR - Error, compilation will stop after parsing completes.
//===----------------------------------------------------------------------===//
-// Portability
-//===----------------------------------------------------------------------===//
-
-DIAG(port_target_macro_use, NOTE,
- "use of a target-specific macro, source is not 'portable'")
-
-DIAG(port_target_builtin_use, NOTE,
- "use of a target-specific builtin function, source is not 'portable'")
-
-DIAG(port_wchar_t, NOTE,
- "sizeof(wchar_t) varies between targets, source is not 'portable'")
-
-//===----------------------------------------------------------------------===//
// Lexer Diagnostics
//===----------------------------------------------------------------------===//
Modified: cfe/trunk/include/clang/Basic/IdentifierTable.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/IdentifierTable.h?rev=47930&r1=47929&r2=47930&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/IdentifierTable.h (original)
+++ cfe/trunk/include/clang/Basic/IdentifierTable.h Tue Mar 4 19:18:20 2008
@@ -45,10 +45,8 @@
bool HasMacro : 1; // True if there is a #define for this.
bool IsExtension : 1; // True if identifier is a lang extension.
bool IsPoisoned : 1; // True if identifier is poisoned.
- bool IsOtherTargetMacro : 1; // True if ident is macro on another target.
bool IsCPPOperatorKeyword : 1; // True if ident is a C++ operator keyword.
- bool IsNonPortableBuiltin : 1; // True if builtin varies across targets.
- // 4 bits left in 32-bit word.
+ // 6 bits left in 32-bit word.
void *FETokenInfo; // Managed by the language front-end.
IdentifierInfo(const IdentifierInfo&); // NONCOPYABLE.
void operator=(const IdentifierInfo&); // NONASSIGNABLE.
@@ -106,13 +104,6 @@
assert(BuiltinID == ID && "ID too large for field!");
}
- /// isNonPortableBuiltin - Return true if this identifier corresponds to a
- /// builtin on some other target, but isn't one on this target, or if it is on
- /// the target but not on another, or if it is on both but it differs somehow
- /// in behavior.
- bool isNonPortableBuiltin() const { return IsNonPortableBuiltin; }
- void setNonPortableBuiltin(bool Val) { IsNonPortableBuiltin = Val; }
-
/// get/setExtension - Initialize information about whether or not this
/// language token is an extension. This controls extension warnings, and is
/// only valid if a custom token ID is set.
@@ -126,11 +117,6 @@
/// isPoisoned - Return true if this token has been poisoned.
bool isPoisoned() const { return IsPoisoned; }
- /// setIsOtherTargetMacro/isOtherTargetMacro control whether this identifier
- /// is seen as being a macro on some other target.
- void setIsOtherTargetMacro(bool Val = true) { IsOtherTargetMacro = Val; }
- bool isOtherTargetMacro() const { return IsOtherTargetMacro; }
-
/// isCPlusPlusOperatorKeyword/setIsCPlusPlusOperatorKeyword controls whether
/// this identifier is a C++ alternate representation of an operator.
void setIsCPlusPlusOperatorKeyword(bool Val = true)
Modified: cfe/trunk/include/clang/Basic/TargetInfo.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/TargetInfo.h?rev=47930&r1=47929&r2=47930&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/TargetInfo.h (original)
+++ cfe/trunk/include/clang/Basic/TargetInfo.h Tue Mar 4 19:18:20 2008
@@ -29,33 +29,13 @@
namespace Builtin { struct Info; }
-/// TargetInfo - This class exposes information about the current target set.
-/// A target set consists of a primary target and zero or more secondary targets
-/// which are each represented by a TargetInfoImpl object. TargetInfo responds
-/// to various queries as though it were the primary target, but keeps track of,
-/// and warns about, the first query made of it that are contradictary among the
-/// targets it tracks. For example, if it contains a "PPC32" and "PPC64"
-/// target, it will warn the first time the size of the 'long' datatype is
-/// queried.
+/// TargetInfo - This class exposes information about the current target.
///
class TargetInfo {
/// Primary - This tracks the primary target in the target set.
///
- const TargetInfoImpl *PrimaryTarget;
+ const TargetInfoImpl *Target;
- /// SecondaryTargets - This tracks the set of secondary targets.
- ///
- std::vector<const TargetInfoImpl*> SecondaryTargets;
-
- /// Diag - If non-null, this object is used to report the first use of
- /// non-portable functionality in the translation unit.
- ///
- Diagnostic *Diag;
-
- /// NonPortable - This instance variable keeps track of whether or not the
- /// current translation unit is portable across the set of targets tracked.
- bool NonPortable;
-
/// These are all caches for target values.
unsigned WCharWidth, WCharAlign;
@@ -63,53 +43,22 @@
// TargetInfo Construction.
//==----------------------------------------------------------------==/
- TargetInfo(const TargetInfoImpl *Primary, Diagnostic *D = 0) {
- PrimaryTarget = Primary;
- Diag = D;
- NonPortable = false;
+ TargetInfo(const TargetInfoImpl *TII) {
+ Target = TII;
// Initialize Cache values to uncomputed.
WCharWidth = 0;
}
- /// AddSecondaryTarget - Add a secondary target to the target set.
- void AddSecondaryTarget(const TargetInfoImpl *Secondary) {
- SecondaryTargets.push_back(Secondary);
- }
-
public:
- /// CreateTargetInfo - Create a TargetInfo object from a group of
- /// target triples. The first target triple is considered the primary
- /// target.
- static TargetInfo* CreateTargetInfo(const std::string* TriplesBeg,
- const std::string* TripledEnd,
- Diagnostic* Diags = NULL);
+ /// CreateTargetInfo - Return the target info object for the specified target
+ /// triple.
+ static TargetInfo* CreateTargetInfo(const std::string &Triple);
~TargetInfo();
- //==----------------------------------------------------------------==/
- // Accessors.
- //==----------------------------------------------------------------==/
-
- /// isNonPortable - Return true if the current translation unit has used a
- /// target property that is non-portable across the secondary targets.
- bool isNonPortable() const {
- return NonPortable;
- }
-
- /// isPortable - Return true if this translation unit is portable across the
- /// secondary targets so far.
- bool isPortable() const {
- return !NonPortable;
- }
-
///===---- Target property query methods --------------------------------===//
- /// DiagnoseNonPortability - Emit a diagnostic indicating that the current
- /// translation unit is non-portable due to a construct at the specified
- /// location. DiagKind indicates what went wrong.
- void DiagnoseNonPortability(FullSourceLoc Loc, unsigned DiagKind);
-
/// getTargetDefines - Appends the target-specific #define values for this
/// target set to the specified buffer.
void getTargetDefines(std::vector<char> &DefineBuffer);
@@ -197,8 +146,8 @@
/// getTargetBuiltins - Return information about target-specific builtins for
/// the current primary target, and info about which builtins are non-portable
/// across the current set of primary and secondary targets.
- void getTargetBuiltins(const Builtin::Info *&Records, unsigned &NumRecords,
- std::vector<const char *> &NonPortableBuiltins) const;
+ void getTargetBuiltins(const Builtin::Info *&Records,
+ unsigned &NumRecords) const;
/// getVAListDeclaration - Return the declaration to use for
/// __builtin_va_list, which is target-specific.
Modified: cfe/trunk/include/clang/Basic/TokenKinds.def
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/TokenKinds.def?rev=47930&r1=47929&r2=47930&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/TokenKinds.def (original)
+++ cfe/trunk/include/clang/Basic/TokenKinds.def Tue Mar 4 19:18:20 2008
@@ -79,11 +79,6 @@
PPKEYWORD(assert)
PPKEYWORD(unassert)
-// clang extensions.
-PPKEYWORD(define_target)
-PPKEYWORD(define_other_target)
-
-
//===----------------------------------------------------------------------===//
// Language keywords.
//===----------------------------------------------------------------------===//
Modified: cfe/trunk/include/clang/Lex/MacroInfo.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Lex/MacroInfo.h?rev=47930&r1=47929&r2=47930&view=diff
==============================================================================
--- cfe/trunk/include/clang/Lex/MacroInfo.h (original)
+++ cfe/trunk/include/clang/Lex/MacroInfo.h Tue Mar 4 19:18:20 2008
@@ -59,9 +59,6 @@
/// it has not yet been redefined or undefined.
bool IsBuiltinMacro : 1;
- /// IsTargetSpecific - True if this is a target-specific macro defined with
- /// #define_target.
- bool IsTargetSpecific : 1;
private:
//===--------------------------------------------------------------------===//
// State that changes as the macro is used.
@@ -97,13 +94,6 @@
IsBuiltinMacro = Val;
}
- /// setIsTargetSpecific - Set or clear the IsTargetSpecific flag.
- ///
- void setIsTargetSpecific(bool Val = true) {
- IsTargetSpecific = Val;
- }
- bool isTargetSpecific() const { return IsTargetSpecific; }
-
/// setIsUsed - Set the value of the IsUsed flag.
///
void setIsUsed(bool Val) {
Modified: cfe/trunk/include/clang/Lex/Preprocessor.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Lex/Preprocessor.h?rev=47930&r1=47929&r2=47930&view=diff
==============================================================================
--- cfe/trunk/include/clang/Lex/Preprocessor.h (original)
+++ cfe/trunk/include/clang/Lex/Preprocessor.h Tue Mar 4 19:18:20 2008
@@ -480,9 +480,8 @@
void HandleImportDirective(Token &Tok);
// Macro handling.
- void HandleDefineDirective(Token &Tok, bool isTargetSpecific);
+ void HandleDefineDirective(Token &Tok);
void HandleUndefDirective(Token &Tok);
- void HandleDefineOtherTargetDirective(Token &Tok);
// HandleAssertDirective(Token &Tok);
// HandleUnassertDirective(Token &Tok);
Removed: cfe/trunk/test/Parser/portability.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Parser/portability.c?rev=47929&view=auto
==============================================================================
--- cfe/trunk/test/Parser/portability.c (original)
+++ cfe/trunk/test/Parser/portability.c (removed)
@@ -1,5 +0,0 @@
-// RUN: clang -arch ppc -arch bogusW16W16 -fsyntax-only %s 2>&1 | grep note | wc -l | grep 1
-
-// wchar_t varies across targets.
-void *X = L"foo";
-
More information about the cfe-commits
mailing list