summaryrefslogtreecommitdiff
path: root/lib/AST
diff options
context:
space:
mode:
authorNico Weber <nicolasweber@gmx.de>2012-06-23 02:07:59 +0000
committerNico Weber <nicolasweber@gmx.de>2012-06-23 02:07:59 +0000
commit28ad063b279378b19cb0704f977429df366a151e (patch)
tree4c797a94b4a042caaad08b236cca4b314c92be6e /lib/AST
parent3f835687b8f7ad3060fe4c462727b212ed714b30 (diff)
downloadclang-28ad063b279378b19cb0704f977429df366a151e.tar.gz
Support L__FUNCTION__ in microsoft mode, PR11789
Heavily based on a patch from Aaron Wishnick <aaron.s.wishnick@gmail.com>. I'll clean up the duplicated function in CodeGen as a follow-up, later today or tomorrow. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159060 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST')
-rw-r--r--lib/AST/StmtDumper.cpp1
-rw-r--r--lib/AST/StmtPrinter.cpp3
2 files changed, 4 insertions, 0 deletions
diff --git a/lib/AST/StmtDumper.cpp b/lib/AST/StmtDumper.cpp
index a57cce8371..ce330e06b7 100644
--- a/lib/AST/StmtDumper.cpp
+++ b/lib/AST/StmtDumper.cpp
@@ -424,6 +424,7 @@ void StmtDumper::VisitPredefinedExpr(PredefinedExpr *Node) {
default: llvm_unreachable("unknown case");
case PredefinedExpr::Func: OS << " __func__"; break;
case PredefinedExpr::Function: OS << " __FUNCTION__"; break;
+ case PredefinedExpr::LFunction: OS << " L__FUNCTION__"; break;
case PredefinedExpr::PrettyFunction: OS << " __PRETTY_FUNCTION__";break;
}
}
diff --git a/lib/AST/StmtPrinter.cpp b/lib/AST/StmtPrinter.cpp
index cb757cdde1..9c7259745c 100644
--- a/lib/AST/StmtPrinter.cpp
+++ b/lib/AST/StmtPrinter.cpp
@@ -643,6 +643,9 @@ void StmtPrinter::VisitPredefinedExpr(PredefinedExpr *Node) {
case PredefinedExpr::Function:
OS << "__FUNCTION__";
break;
+ case PredefinedExpr::LFunction:
+ OS << "L__FUNCTION__";
+ break;
case PredefinedExpr::PrettyFunction:
OS << "__PRETTY_FUNCTION__";
break;