mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-26 13:06:06 +00:00
[PassInstrumentation] Use DenseMap to store class->pass map (NFC)
It's okay to store the StringRef for the class name without creating a separate copy inside the map, so use DenseMap instead of StringMap.
This commit is contained in:
parent
57c083ecfb
commit
53a059ca76
@ -52,7 +52,7 @@
|
||||
#include "llvm/ADT/Any.h"
|
||||
#include "llvm/ADT/FunctionExtras.h"
|
||||
#include "llvm/ADT/SmallVector.h"
|
||||
#include "llvm/ADT/StringMap.h"
|
||||
#include "llvm/ADT/DenseMap.h"
|
||||
#include "llvm/IR/PassManager.h"
|
||||
#include <type_traits>
|
||||
#include <vector>
|
||||
@ -185,7 +185,7 @@ private:
|
||||
SmallVector<llvm::unique_function<AnalysesClearedFunc>, 4>
|
||||
AnalysesClearedCallbacks;
|
||||
|
||||
StringMap<std::string> ClassToPassName;
|
||||
DenseMap<StringRef, std::string> ClassToPassName;
|
||||
};
|
||||
|
||||
/// This class provides instrumentation entry points for the Pass Manager,
|
||||
|
Loading…
x
Reference in New Issue
Block a user