forked from OSchip/llvm-project
add codegen support for __func__ and friends, producing the same
output that GCC does. rdar://6440297 llvm-svn: 60922
This commit is contained in:
parent
f45c5ecb3b
commit
b4396f40a0
|
@ -612,6 +612,16 @@ public:
|
|||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case Expr::PredefinedExprClass: {
|
||||
// __func__/__FUNCTION__ -> "". __PRETTY_FUNCTION__ -> "top level".
|
||||
std::string Str;
|
||||
if (cast<PredefinedExpr>(E)->getIdentType() ==
|
||||
PredefinedExpr::PrettyFunction)
|
||||
Str = "top level";
|
||||
|
||||
return CGM.GetAddrOfConstantCString(Str, ".tmp");
|
||||
}
|
||||
}
|
||||
CGM.ErrorUnsupported(E, "constant l-value expression");
|
||||
llvm::Type *Ty = llvm::PointerType::getUnqual(ConvertType(E->getType()));
|
||||
|
|
Loading…
Reference in New Issue