mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-05 14:34:55 +00:00
Revert "Fix UBSan report in StringMap implementation."
This reverts commit r223402. Some bots fail with -Winvalid-offsetof warning. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223407 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
9e8083744d
commit
59d867405a
@ -182,7 +182,10 @@ public:
|
||||
/// GetStringMapEntryFromValue - Given a value that is known to be embedded
|
||||
/// into a StringMapEntry, return the StringMapEntry itself.
|
||||
static StringMapEntry &GetStringMapEntryFromValue(ValueTy &V) {
|
||||
char *Ptr = reinterpret_cast<char *>(&V) - offsetof(StringMapEntry, second);
|
||||
StringMapEntry *EPtr = 0;
|
||||
char *Ptr = reinterpret_cast<char*>(&V) -
|
||||
(reinterpret_cast<char*>(&EPtr->second) -
|
||||
reinterpret_cast<char*>(EPtr));
|
||||
return *reinterpret_cast<StringMapEntry*>(Ptr);
|
||||
}
|
||||
static const StringMapEntry &GetStringMapEntryFromValue(const ValueTy &V) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user