diff options
author | Chris Lattner <sabre@nondot.org> | 2008-10-05 19:22:37 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-10-05 19:22:37 +0000 |
commit | 3fdf4678935b27c3d3fd4eb10bf9f5ab98dc0d99 (patch) | |
tree | 9de6dd64864634ad57a605b0e67c8ac3acac9cc8 /lib/Lex/Preprocessor.cpp | |
parent | 8223b1d05fc6f46e76bb06d836c1e6dec764e65b (diff) |
Implement PR2773, support for __USER_LABEL_PREFIX__
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57127 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Lex/Preprocessor.cpp')
-rw-r--r-- | lib/Lex/Preprocessor.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/Lex/Preprocessor.cpp b/lib/Lex/Preprocessor.cpp index 458eca640a..12f63d6444 100644 --- a/lib/Lex/Preprocessor.cpp +++ b/lib/Lex/Preprocessor.cpp @@ -425,6 +425,13 @@ static void InitializePredefinedMacros(Preprocessor &PP, Buf.push_back('\n'); } + if (const char *Prefix = PP.getTargetInfo().getUserLabelPrefix()) { + llvm::SmallString<20> TmpStr; + TmpStr += "__USER_LABEL_PREFIX__="; + TmpStr += Prefix; + DefineBuiltinMacro(Buf, TmpStr.c_str()); + } + // Get the target #defines. PP.getTargetInfo().getTargetDefines(Buf); |