diff options
author | Anders Carlsson <andersca@mac.com> | 2008-11-15 18:52:06 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2008-11-15 18:52:06 +0000 |
commit | d114ade7f12e388c685e293ae94356c6b0b221f7 (patch) | |
tree | 8bb3090875aaf049f4e38def6e7c6d450397b5d5 /lib/CodeGen/CGExprConstant.cpp | |
parent | 0adfbf6e72f65c82524589f76f5beb12b09e842d (diff) |
Use IgnoreParenCasts. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59371 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGExprConstant.cpp')
-rw-r--r-- | lib/CodeGen/CGExprConstant.cpp | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/lib/CodeGen/CGExprConstant.cpp b/lib/CodeGen/CGExprConstant.cpp index 1e224571f9..e187d890e9 100644 --- a/lib/CodeGen/CGExprConstant.cpp +++ b/lib/CodeGen/CGExprConstant.cpp @@ -619,16 +619,7 @@ public: // Handle __builtin___CFStringMakeConstantString. if (E->isBuiltinCall() ==Builtin::BI__builtin___CFStringMakeConstantString){ - const Expr *Arg = E->getArg(0); - - while (1) { - if (const ParenExpr *PE = dyn_cast<ParenExpr>(Arg)) - Arg = PE->getSubExpr(); - else if (const ImplicitCastExpr *CE = dyn_cast<ImplicitCastExpr>(Arg)) - Arg = CE->getSubExpr(); - else - break; - } + const Expr *Arg = E->getArg(0)->IgnoreParenCasts(); const StringLiteral *Literal = cast<StringLiteral>(Arg); std::string S(Literal->getStrData(), Literal->getByteLength()); |