diff options
author | Roman Divacky <rdivacky@FreeBSD.org> | 2009-10-14 18:03:49 +0000 |
---|---|---|
committer | Roman Divacky <rdivacky@FreeBSD.org> | 2009-10-14 18:03:49 +0000 |
commit | 4c8b24812ddcd1dedaca343a6d4e76f91f398981 (patch) | |
tree | 137ebebcae16fb0ce7ab4af456992bbd8d22fced /lib/AST/APValue.cpp | |
parent | 5362a71c02e7d448a8ce98cf00c47e353fba5d04 (diff) |
Notes
Diffstat (limited to 'lib/AST/APValue.cpp')
-rw-r--r-- | lib/AST/APValue.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/AST/APValue.cpp b/lib/AST/APValue.cpp index 4df7671c5a955..772a884c90d36 100644 --- a/lib/AST/APValue.cpp +++ b/lib/AST/APValue.cpp @@ -37,7 +37,7 @@ const APValue &APValue::operator=(const APValue &RHS) { else if (isFloat()) setFloat(RHS.getFloat()); else if (isVector()) - setVector(((Vec*)(void*)RHS.Data)->Elts, RHS.getVectorLength()); + setVector(((Vec*)(char*)RHS.Data)->Elts, RHS.getVectorLength()); else if (isComplexInt()) setComplexInt(RHS.getComplexIntReal(), RHS.getComplexIntImag()); else if (isComplexFloat()) @@ -49,17 +49,17 @@ const APValue &APValue::operator=(const APValue &RHS) { void APValue::MakeUninit() { if (Kind == Int) - ((APSInt*)(void*)Data)->~APSInt(); + ((APSInt*)(char*)Data)->~APSInt(); else if (Kind == Float) - ((APFloat*)(void*)Data)->~APFloat(); + ((APFloat*)(char*)Data)->~APFloat(); else if (Kind == Vector) - ((Vec*)(void*)Data)->~Vec(); + ((Vec*)(char*)Data)->~Vec(); else if (Kind == ComplexInt) - ((ComplexAPSInt*)(void*)Data)->~ComplexAPSInt(); + ((ComplexAPSInt*)(char*)Data)->~ComplexAPSInt(); else if (Kind == ComplexFloat) - ((ComplexAPFloat*)(void*)Data)->~ComplexAPFloat(); + ((ComplexAPFloat*)(char*)Data)->~ComplexAPFloat(); else if (Kind == LValue) { - ((LV*)(void*)Data)->~LV(); + ((LV*)(char*)Data)->~LV(); } Kind = Uninitialized; } @@ -91,7 +91,7 @@ void APValue::print(llvm::raw_ostream &OS) const { return; case Vector: OS << "Vector: " << getVectorElt(0); - for (unsigned i = 1; i != getVectorLength(); ++i) + for (unsigned i = 1; i != getVectorLength(); ++i) OS << ", " << getVectorElt(i); return; case ComplexInt: |