mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-28 19:31:58 +00:00
Expand some code with temporary variables to rid ourselves of the warning
about "dereferencing type-punned pointer will break strict-aliasing rules" git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27671 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
463b4e5f4c
commit
60d07eeffe
@ -580,7 +580,9 @@ AnchoredDesc::AnchoredDesc(unsigned T)
|
||||
void AnchoredDesc::ApplyToFields(DIVisitor *Visitor) {
|
||||
DebugInfoDesc::ApplyToFields(Visitor);
|
||||
|
||||
Visitor->Apply((DebugInfoDesc *&)Anchor);
|
||||
DebugInfoDesc *Tmp = Anchor;
|
||||
Visitor->Apply(Tmp);
|
||||
Anchor = (AnchorDesc*)Tmp;
|
||||
}
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
@ -670,7 +672,9 @@ void TypeDesc::ApplyToFields(DIVisitor *Visitor) {
|
||||
|
||||
Visitor->Apply(Context);
|
||||
Visitor->Apply(Name);
|
||||
Visitor->Apply((DebugInfoDesc *&)File);
|
||||
DebugInfoDesc* Tmp = File;
|
||||
Visitor->Apply(Tmp);
|
||||
File = (CompileUnitDesc*)Tmp;
|
||||
Visitor->Apply(Line);
|
||||
Visitor->Apply(Size);
|
||||
Visitor->Apply(Align);
|
||||
@ -775,7 +779,9 @@ bool DerivedTypeDesc::classof(const DebugInfoDesc *D) {
|
||||
void DerivedTypeDesc::ApplyToFields(DIVisitor *Visitor) {
|
||||
TypeDesc::ApplyToFields(Visitor);
|
||||
|
||||
Visitor->Apply((DebugInfoDesc *&)FromType);
|
||||
DebugInfoDesc* Tmp = FromType;
|
||||
Visitor->Apply(Tmp);
|
||||
FromType = (TypeDesc*)Tmp;
|
||||
}
|
||||
|
||||
/// getDescString - Return a string used to compose global names and labels.
|
||||
@ -975,9 +981,13 @@ void VariableDesc::ApplyToFields(DIVisitor *Visitor) {
|
||||
|
||||
Visitor->Apply(Context);
|
||||
Visitor->Apply(Name);
|
||||
Visitor->Apply((DebugInfoDesc *&)File);
|
||||
DebugInfoDesc* Tmp1 = File;
|
||||
Visitor->Apply(Tmp1);
|
||||
File = (CompileUnitDesc*)Tmp1;
|
||||
Visitor->Apply(Line);
|
||||
Visitor->Apply((DebugInfoDesc *&)TyDesc);
|
||||
DebugInfoDesc* Tmp2 = TyDesc;
|
||||
Visitor->Apply(Tmp2);
|
||||
TyDesc = (TypeDesc*)Tmp2;
|
||||
}
|
||||
|
||||
/// getDescString - Return a string used to compose global names and labels.
|
||||
@ -1024,9 +1034,13 @@ void GlobalDesc::ApplyToFields(DIVisitor *Visitor) {
|
||||
|
||||
Visitor->Apply(Context);
|
||||
Visitor->Apply(Name);
|
||||
Visitor->Apply((DebugInfoDesc *&)File);
|
||||
DebugInfoDesc* Tmp1 = File;
|
||||
Visitor->Apply(Tmp1);
|
||||
File = (CompileUnitDesc*)Tmp1;
|
||||
Visitor->Apply(Line);
|
||||
Visitor->Apply((DebugInfoDesc *&)TyDesc);
|
||||
DebugInfoDesc* Tmp2 = TyDesc;
|
||||
Visitor->Apply(Tmp2);
|
||||
TyDesc = (TypeDesc*)Tmp2;
|
||||
Visitor->Apply(IsStatic);
|
||||
Visitor->Apply(IsDefinition);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user