diff options
Diffstat (limited to 'clang/AST/Expr.cpp')
| -rw-r--r-- | clang/AST/Expr.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/clang/AST/Expr.cpp b/clang/AST/Expr.cpp index 46051574491..f00301c759f 100644 --- a/clang/AST/Expr.cpp +++ b/clang/AST/Expr.cpp @@ -43,6 +43,28 @@ void FloatingConstant::dump_impl() const { std::cerr << "1.0"; } + + +StringExpr::StringExpr(const char *strData, unsigned byteLength, bool Wide) { + // OPTIMIZE: could allocate this appended to the StringExpr. + char *AStrData = new char[byteLength]; + memcpy(AStrData, strData, byteLength); + StrData = AStrData; + ByteLength = byteLength; + isWide = Wide; +} + +StringExpr::~StringExpr() { + delete[] StrData; +} + +void StringExpr::dump_impl() const { + if (isWide) std::cerr << 'L'; + std::cerr << '"' << StrData << '"'; +} + + + void ParenExpr::dump_impl() const { std::cerr << "'('"; Val->dump(); |

