Changeset 6a1dfda for src/AST/Expr.cpp
- Timestamp:
- Jun 13, 2019, 8:41:11 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:
- c36298d
- Parents:
- dc5072f (diff), 6896548 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - git-author:
- Peter A. Buhr <pabuhr@…> (06/13/19 20:39:34)
- git-committer:
- Peter A. Buhr <pabuhr@…> (06/13/19 20:41:11)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/AST/Expr.cpp
rdc5072f r6a1dfda 9 9 // Author : Aaron B. Moss 10 10 // Created On : Wed May 15 17:00:00 2019 11 // Last Modified By : A aron B. Moss12 // Created On : Wed May 15 17:00:00 201913 // Update Count : 111 // Last Modified By : Andrew Beach 12 // Created On : Thr Jun 13 13:38:00 2019 13 // Update Count : 2 14 14 // 15 15 … … 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{ … … 382 370 383 371 UniqueExpr::UniqueExpr( const CodeLocation & loc, const Expr * e, unsigned long long i ) 384 : Expr( loc, e->result ), id( i ) {372 : Expr( loc, e->result ), expr( e ), id( i ) { 385 373 assert( expr ); 386 374 if ( id == -1ull ) {
Note: See TracChangeset
for help on using the changeset viewer.