summaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGExpr.cpp
diff options
context:
space:
mode:
authorDavid Majnemer <david.majnemer@gmail.com>2013-11-06 23:31:56 +0000
committerDavid Majnemer <david.majnemer@gmail.com>2013-11-06 23:31:56 +0000
commitbafa74f360cb3ec82fa8c688845330f491d167fd (patch)
tree04e5868504115359abe3a3fc4a9c80d82d250921 /lib/CodeGen/CGExpr.cpp
parent00b0f7e1174b7f552ffec0fe0e088584a5d1d092 (diff)
downloadclang-bafa74f360cb3ec82fa8c688845330f491d167fd.tar.gz
clang-bafa74f360cb3ec82fa8c688845330f491d167fd.tar.bz2
clang-bafa74f360cb3ec82fa8c688845330f491d167fd.tar.xz
[-fms-extensions] Add support for __FUNCDNAME__
Summary: Similar to __FUNCTION__, MSVC exposes the name of the enclosing mangled function name via __FUNCDNAME__. This implementation is very naive and unoptimized, it is expected that __FUNCDNAME__ would be used rarely in practice. Reviewers: rnk, rsmith, thakis CC: cfe-commits, silvas Differential Revision: http://llvm-reviews.chandlerc.com/D2109 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194181 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGExpr.cpp')
-rw-r--r--lib/CodeGen/CGExpr.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/CodeGen/CGExpr.cpp b/lib/CodeGen/CGExpr.cpp
index 4a427d540f..96d6a019c2 100644
--- a/lib/CodeGen/CGExpr.cpp
+++ b/lib/CodeGen/CGExpr.cpp
@@ -1944,6 +1944,7 @@ LValue CodeGenFunction::EmitPredefinedLValue(const PredefinedExpr *E) {
case PredefinedExpr::Func:
case PredefinedExpr::Function:
case PredefinedExpr::LFunction:
+ case PredefinedExpr::FuncDName:
case PredefinedExpr::PrettyFunction: {
PredefinedExpr::IdentType IdentType = E->getIdentType();
std::string GlobalVarName;
@@ -1956,6 +1957,9 @@ LValue CodeGenFunction::EmitPredefinedLValue(const PredefinedExpr *E) {
case PredefinedExpr::Function:
GlobalVarName = "__FUNCTION__.";
break;
+ case PredefinedExpr::FuncDName:
+ GlobalVarName = "__FUNCDNAME__.";
+ break;
case PredefinedExpr::LFunction:
GlobalVarName = "L__FUNCTION__.";
break;