[IR] Move GlobalValue::getGUID() out of line (NFC)
Avoid including MD5.h in a core IR header.
This commit is contained in:
@@ -24,7 +24,6 @@
|
||||
#include "llvm/IR/Value.h"
|
||||
#include "llvm/Support/Casting.h"
|
||||
#include "llvm/Support/ErrorHandling.h"
|
||||
#include "llvm/Support/MD5.h"
|
||||
#include <cassert>
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
@@ -588,7 +587,7 @@ public:
|
||||
|
||||
/// Return a 64-bit global unique ID constructed from global value name
|
||||
/// (i.e. returned by getGlobalIdentifier()).
|
||||
static GUID getGUID(StringRef GlobalName) { return MD5Hash(GlobalName); }
|
||||
static GUID getGUID(StringRef GlobalName);
|
||||
|
||||
/// Return a 64-bit global unique ID constructed from global value name
|
||||
/// (i.e. returned by getGlobalIdentifier()).
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
#include "llvm/IR/Module.h"
|
||||
#include "llvm/Support/Error.h"
|
||||
#include "llvm/Support/ErrorHandling.h"
|
||||
#include "llvm/Support/MD5.h"
|
||||
#include "llvm/TargetParser/Triple.h"
|
||||
using namespace llvm;
|
||||
|
||||
@@ -71,6 +72,10 @@ void GlobalValue::copyAttributesFrom(const GlobalValue *Src) {
|
||||
removeSanitizerMetadata();
|
||||
}
|
||||
|
||||
GlobalValue::GUID GlobalValue::getGUID(StringRef GlobalName) {
|
||||
return MD5Hash(GlobalName);
|
||||
}
|
||||
|
||||
void GlobalValue::removeFromParent() {
|
||||
switch (getValueID()) {
|
||||
#define HANDLE_GLOBAL_VALUE(NAME) \
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
#include "llvm/IR/Value.h"
|
||||
#include "llvm/Pass.h"
|
||||
#include "llvm/Support/CommandLine.h"
|
||||
#include "llvm/Support/MD5.h"
|
||||
#include "llvm/Transforms/Utils/ModuleUtils.h"
|
||||
|
||||
using namespace llvm;
|
||||
|
||||
@@ -53,6 +53,7 @@
|
||||
#include "llvm/Support/Casting.h"
|
||||
#include "llvm/Support/CommandLine.h"
|
||||
#include "llvm/Support/Debug.h"
|
||||
#include "llvm/Support/MD5.h"
|
||||
#include "llvm/Support/RandomNumberGenerator.h"
|
||||
#include "llvm/Support/raw_ostream.h"
|
||||
#include "llvm/TargetParser/Triple.h"
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
#include "llvm/IR/IRBuilder.h"
|
||||
#include "llvm/IR/MDBuilder.h"
|
||||
#include "llvm/IR/Module.h"
|
||||
#include "llvm/Support/MD5.h"
|
||||
#include "llvm/Support/raw_ostream.h"
|
||||
#include "llvm/Support/xxhash.h"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user