Changeset 6896548 for src/AST/Expr.cpp
- Timestamp:
- Jun 13, 2019, 3:56:24 PM (5 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 6a1dfda
- Parents:
- d76f32c
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/AST/Expr.cpp
rd76f32c r6896548 238 238 } 239 239 240 ConstantExpr * ConstantExpr::from_string( const CodeLocation & loc, const std::string & s ) {241 return new ConstantExpr{242 loc,243 new ArrayType{244 new BasicType{ BasicType::Char, CV::Const },245 ConstantExpr::from_int( loc, s.size() + 1 /* null terminator */ ),246 FixedLen, DynamicDim },247 std::string{"\""} + s + "\"",248 (unsigned long long)0,249 ConstantExpr::String };250 }251 252 240 ConstantExpr * ConstantExpr::null( const CodeLocation & loc, const Type * ptrType ) { 253 241 return new ConstantExpr{
Note: See TracChangeset
for help on using the changeset viewer.