[cfe-commits] r69521 - /cfe/trunk/tools/clang-cc/clang-cc.cpp

Chris Lattner sabre at nondot.org
Sun Apr 19 00:06:52 PDT 2009


Author: lattner
Date: Sun Apr 19 02:06:52 2009
New Revision: 69521

URL: http://llvm.org/viewvc/llvm-project?rev=69521&view=rev
Log:
fix -fdollars-in-identifiers to have a default that is overriden 
by the command line option if present.

Modified:
    cfe/trunk/tools/clang-cc/clang-cc.cpp

Modified: cfe/trunk/tools/clang-cc/clang-cc.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/clang-cc/clang-cc.cpp?rev=69521&r1=69520&r2=69521&view=diff

==============================================================================
--- cfe/trunk/tools/clang-cc/clang-cc.cpp (original)
+++ cfe/trunk/tools/clang-cc/clang-cc.cpp Sun Apr 19 02:06:52 2009
@@ -784,10 +784,11 @@
   if (!Options.ObjC1 && !Options.GNUMode)
     Options.Blocks = 0;
   
-  // Never accept '$' in identifiers when preprocessing assembler.
-  if (LK != langkind_asm_cpp)
-    Options.DollarIdents = true;  // FIXME: target property?
-  else
+  // Default to not accepting '$' in identifiers when preprocessing assembler,
+  // but do accept when preprocessing C.  FIXME: these defaults are right for
+  // darwin, are they right everywhere?
+  Options.DollarIdents = LK != langkind_asm_cpp;
+  if (DollarsInIdents.getPosition())  // Explicit setting overrides default.
     Options.DollarIdents = DollarsInIdents;
   
   if (PascalStrings.getPosition())





More information about the cfe-commits mailing list