mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
Initial update to VMCore to use Twines for string arguments.
- The only meat here is in Value.{h,cpp} the rest is essential 'const std::string &' -> 'const Twine &'. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77048 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -20,6 +20,7 @@
|
||||
#include "llvm/Module.h"
|
||||
#include "llvm/MDNode.h"
|
||||
#include "llvm/ValueSymbolTable.h"
|
||||
#include "llvm/ADT/SmallString.h"
|
||||
#include "llvm/Support/Debug.h"
|
||||
#include "llvm/Support/ErrorHandling.h"
|
||||
#include "llvm/Support/LeakDetector.h"
|
||||
@@ -183,8 +184,10 @@ StringRef Value::getNameRef() const {
|
||||
return StringRef(Name->getKeyData(), Name->getKeyLength());
|
||||
}
|
||||
|
||||
void Value::setName(const std::string &name) {
|
||||
setName(&name[0], name.size());
|
||||
void Value::setName(const Twine &Name) {
|
||||
SmallString<32> NameData;
|
||||
Name.toVector(NameData);
|
||||
setName(NameData.begin(), NameData.size());
|
||||
}
|
||||
|
||||
void Value::setName(const char *Name) {
|
||||
|
Reference in New Issue
Block a user