mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-07-22 09:29:31 +00:00
my mistake, Mangler::makeNameProper wants to take a twine, not a stringref!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93296 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
1cb75460b6
commit
36e69ae3c1
@ -19,7 +19,7 @@
|
|||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
namespace llvm {
|
namespace llvm {
|
||||||
class StringRef;
|
class Twine;
|
||||||
class Type;
|
class Type;
|
||||||
class Module;
|
class Module;
|
||||||
class Value;
|
class Value;
|
||||||
@ -112,7 +112,7 @@ public:
|
|||||||
/// does this for you, so there's no point calling it on the result
|
/// does this for you, so there's no point calling it on the result
|
||||||
/// from getValueName.
|
/// from getValueName.
|
||||||
///
|
///
|
||||||
std::string makeNameProper(StringRef x,
|
std::string makeNameProper(const Twine &Name,
|
||||||
ManglerPrefixTy PrefixTy = Mangler::Default);
|
ManglerPrefixTy PrefixTy = Mangler::Default);
|
||||||
|
|
||||||
/// getNameWithPrefix - Fill OutName with the name of the appropriate prefix
|
/// getNameWithPrefix - Fill OutName with the name of the appropriate prefix
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
#include "llvm/ADT/STLExtras.h"
|
#include "llvm/ADT/STLExtras.h"
|
||||||
#include "llvm/ADT/StringExtras.h"
|
#include "llvm/ADT/StringExtras.h"
|
||||||
#include "llvm/ADT/StringMap.h"
|
#include "llvm/ADT/StringMap.h"
|
||||||
#include "llvm/ADT/SmallVector.h"
|
#include "llvm/ADT/SmallString.h"
|
||||||
#include "llvm/Support/raw_ostream.h"
|
#include "llvm/Support/raw_ostream.h"
|
||||||
using namespace llvm;
|
using namespace llvm;
|
||||||
|
|
||||||
@ -32,8 +32,11 @@ static std::string MangleLetter(unsigned char C) {
|
|||||||
/// makeNameProper - We don't want identifier names non-C-identifier characters
|
/// makeNameProper - We don't want identifier names non-C-identifier characters
|
||||||
/// in them, so mangle them as appropriate.
|
/// in them, so mangle them as appropriate.
|
||||||
///
|
///
|
||||||
std::string Mangler::makeNameProper(StringRef X,
|
std::string Mangler::makeNameProper(const Twine &TheName,
|
||||||
ManglerPrefixTy PrefixTy) {
|
ManglerPrefixTy PrefixTy) {
|
||||||
|
SmallString<256> TmpData;
|
||||||
|
TheName.toVector(TmpData);
|
||||||
|
StringRef X = TmpData.str();
|
||||||
assert(!X.empty() && "Cannot mangle empty strings");
|
assert(!X.empty() && "Cannot mangle empty strings");
|
||||||
|
|
||||||
if (!UseQuotes) {
|
if (!UseQuotes) {
|
||||||
|
Loading…
Reference in New Issue
Block a user