forked from OSchip/llvm-project
Two minor fixes to user-defined literals:
- Zero-initialize UDLData so that crashes stop - Stop complaining that we can't emit them (we most certainly can) llvm-svn: 112467
This commit is contained in:
parent
9ed87ba797
commit
e3675ef0f3
|
@ -145,7 +145,7 @@ public:
|
|||
|
||||
/// makeUserDefinedLiteral - Set this token to be a user-defined literal
|
||||
void makeUserDefinedLiteral(llvm::BumpPtrAllocator &Alloc) {
|
||||
PtrData = new (Alloc.Allocate(sizeof(UDLData), 4)) UDLData;
|
||||
PtrData = new (Alloc.Allocate(sizeof(UDLData), 4)) UDLData();
|
||||
setFlag(UserDefinedLiteral);
|
||||
}
|
||||
|
||||
|
|
|
@ -210,6 +210,9 @@ public:
|
|||
|
||||
return CGF.EmitCallExpr(E).getScalarVal();
|
||||
}
|
||||
Value *VisitUDLiteralExpr(const UDLiteralExpr *E) {
|
||||
return VisitCallExpr(E);
|
||||
}
|
||||
|
||||
Value *VisitStmtExpr(const StmtExpr *E);
|
||||
|
||||
|
|
Loading…
Reference in New Issue