diff options
author | Chris Lattner <sabre@nondot.org> | 2009-04-19 07:06:52 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-04-19 07:06:52 +0000 |
commit | 01638a619a5bfcf7f5fbd32da5eda5a9ef6a98bf (patch) | |
tree | 067daa8e13459ddd9ca15cb00afe7e37c4257e99 /tools/clang-cc | |
parent | f5db8f82d5e3b1be3540775329ccd95449fe8721 (diff) |
fix -fdollars-in-identifiers to have a default that is overriden
by the command line option if present.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69521 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/clang-cc')
-rw-r--r-- | tools/clang-cc/clang-cc.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/tools/clang-cc/clang-cc.cpp b/tools/clang-cc/clang-cc.cpp index 07c1518e6d..4e5ff5d259 100644 --- a/tools/clang-cc/clang-cc.cpp +++ b/tools/clang-cc/clang-cc.cpp @@ -784,10 +784,11 @@ static void InitializeLanguageStandard(LangOptions &Options, LangKind LK, 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()) |