forked from OSchip/llvm-project
[-cxx-abi microsoft] Mangle reference temporaries
They are mangled the same as normal references, nothing special is going on here. llvm-svn: 197184
This commit is contained in:
parent
4431fe6bec
commit
0834f13c95
|
@ -2040,10 +2040,9 @@ void MicrosoftMangleContextImpl::mangleCXXDtor(const CXXDestructorDecl *D,
|
|||
}
|
||||
|
||||
void MicrosoftMangleContextImpl::mangleReferenceTemporary(const VarDecl *VD,
|
||||
raw_ostream &) {
|
||||
unsigned DiagID = getDiags().getCustomDiagID(DiagnosticsEngine::Error,
|
||||
"cannot mangle this reference temporary yet");
|
||||
getDiags().Report(VD->getLocation(), DiagID);
|
||||
raw_ostream &Out) {
|
||||
MicrosoftCXXNameMangler mangler(*this, Out);
|
||||
mangler.mangle(VD);
|
||||
}
|
||||
|
||||
void MicrosoftMangleContextImpl::mangleStaticGuardVariable(const VarDecl *VD,
|
||||
|
|
|
@ -445,3 +445,10 @@ decltype(a) fun(decltype(a) x, decltype(a)) { return x; }
|
|||
// CHECK-DAG: ?fun@PR18022@@YA?AU<unnamed-type-a>@1@U21@0@Z
|
||||
|
||||
}
|
||||
|
||||
// Binding to a bit-field that requires a temporary.
|
||||
struct { int bitfield : 3; } object_with_bitfield = { 3 };
|
||||
const int &reference_to_bitfield = object_with_bitfield.bitfield;
|
||||
// CHECK-DAG: ?object_with_bitfield@@3U<unnamed-type-object_with_bitfield>@@A
|
||||
// CHECK-DAG: ?reference_to_bitfield@@3ABHB
|
||||
// CHECK-DAG: ??__Ereference_to_bitfield@@YAXXZ
|
||||
|
|
Loading…
Reference in New Issue