mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
When doing v1->RAUW(v2), don't do anything to metadata. We don't know
why one was replaced with the other. Even in the specific case of debug information, it doesn't make sense to transfer the location over, this will just result in jumbled loc info. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92241 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -19,7 +19,6 @@
|
||||
#include "llvm/Instructions.h"
|
||||
#include "llvm/Operator.h"
|
||||
#include "llvm/Module.h"
|
||||
#include "llvm/Metadata.h"
|
||||
#include "llvm/ValueSymbolTable.h"
|
||||
#include "llvm/ADT/SmallString.h"
|
||||
#include "llvm/Support/Debug.h"
|
||||
@@ -302,14 +301,6 @@ void Value::uncheckedReplaceAllUsesWith(Value *New) {
|
||||
if (HasValueHandle)
|
||||
ValueHandleBase::ValueIsRAUWd(this, New);
|
||||
|
||||
// FIXME: It doesn't make sense at all for metadata to follow RAUW.
|
||||
if (Instruction *I = dyn_cast<Instruction>(this))
|
||||
if (I->hasMetadata()) {
|
||||
LLVMContext &Context = getContext();
|
||||
// FIXME: NUKE ValueIsRAUWd??
|
||||
Context.pImpl->TheMetadata.ValueIsRAUWd(this, New);
|
||||
}
|
||||
|
||||
while (!use_empty()) {
|
||||
Use &U = *UseList;
|
||||
// Must handle Constants specially, we cannot call replaceUsesOfWith on a
|
||||
|
Reference in New Issue
Block a user