From 51ff879a070553b3628b49099f12995ec1c35263 Mon Sep 17 00:00:00 2001 From: Siu Kwan Lam Date: Thu, 28 Feb 2013 00:01:03 -0600 Subject: [PATCH] Fix incorrect use of StringRef in return value --- llvmpy/src/DataLayout.py | 2 +- llvmpy/src/Pass.py | 2 +- llvmpy/src/Support/TargetRegistry.py | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/llvmpy/src/DataLayout.py b/llvmpy/src/DataLayout.py index 7085f52..812a83d 100644 --- a/llvmpy/src/DataLayout.py +++ b/llvmpy/src/DataLayout.py @@ -30,7 +30,7 @@ class DataLayout: isLittleEndian = Method(cast(Bool, bool)) isBigEndian = Method(cast(Bool, bool)) - getStringRepresentation = Method(cast(StringRef, str)) + getStringRepresentation = Method(cast(StdString, str)) @CustomPythonMethod def __str__(self): diff --git a/llvmpy/src/Pass.py b/llvmpy/src/Pass.py index ad03d9a..52173cd 100644 --- a/llvmpy/src/Pass.py +++ b/llvmpy/src/Pass.py @@ -15,7 +15,7 @@ class Pass: _include_ = 'llvm/Pass.h' delete = Destructor() - getPassName = Method(cast(StringRef, str)) + getPassName = Method(cast(StdString, str)) dump = Method() @ModulePass diff --git a/llvmpy/src/Support/TargetRegistry.py b/llvmpy/src/Support/TargetRegistry.py index 640364b..2a445e7 100644 --- a/llvmpy/src/Support/TargetRegistry.py +++ b/llvmpy/src/Support/TargetRegistry.py @@ -16,8 +16,8 @@ from src.Support.CodeGen import Reloc, CodeModel, CodeGenOpt class Target: getNext = Method(const(ptr(Target))) - getName = Method(cast(StringRef, str)) - getShortDescription = Method(cast(StringRef, str)) + getName = Method(cast(StdString, str)) + getShortDescription = Method(cast(StdString, str)) def _has(): return Method(cast(Bool, bool))