Skip to content

Merge and use StringRef in getPassName (NFC) #17

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 84 commits into from
Oct 3, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
84 commits
Select commit Hold shift + click to select a range
da69cda
[AArch64][RegisterBankInfo] Use the static opds mapping for alt mappings
Sep 30, 2016
ce2d317
[AArch64][RegisterBankInfo] Rename getRegBankIdx to getRegBankIdxOffset
Sep 30, 2016
caf04a8
[AArch64][RegisterBankInfo] Refactor the code to access AArch64::ValM…
Sep 30, 2016
e4d60ad
[AArch64][RegisterBankInfo] Compress the ValueMapping table a bit.
Sep 30, 2016
2bd65b5
[AArch64][RegisterBankInfo] Rename getValueMappingIdx to getValueMapping
Sep 30, 2016
e71d314
[AArch64][RegisterBankInfo] Use the helper functions for the checks
Sep 30, 2016
7d8f62d
[SEH] Emit the parent frame offset label even if there are no funclets
rnk Sep 30, 2016
5d78fc6
[libFuzzer] remove unused option
kcc Sep 30, 2016
7faa446
[libFuzzer] fix openssl fuzzer tests when running on a machine w/o op…
kcc Sep 30, 2016
a179dcf
ScheduleDAGInstrs: Cleanup, use range based for; NFC
MatzeB Sep 30, 2016
c5efc2c
[llvm-objdump] Switch to a range loop. NFCI.
dcci Sep 30, 2016
b6b3db7
[libFuzzer] remove some experimental code
kcc Sep 30, 2016
090f75d
[ASAN] Add the binder globals on Darwin to llvm.compiler.used to avoi…
joker-eph Oct 1, 2016
28901d9
[MC] Prevent out of order HashDirective lexing in AsmLexer.
niravhdave Oct 1, 2016
f46303a
[libFuzzer] implement the -shrink=1 option that tires to make element…
kcc Oct 1, 2016
fc85882
Use StringRef in Triple API (NFC)
joker-eph Oct 1, 2016
a5deba0
Use StringRef in LTOModule implementation (NFC)
joker-eph Oct 1, 2016
65e620e
Use StringRef in LTOCodegenerator (NFC)
joker-eph Oct 1, 2016
494146d
AMDGPU: Don't use offen if it is 0
arsenm Oct 1, 2016
76315da
Remove TargetTriple from AArch64MCInstLower as it's used in few places
echristo Oct 1, 2016
0c50304
Stop calling getTargetTriple off of the AsmPrinter and constructing a
echristo Oct 1, 2016
26e89a7
Remove getTargetTriple and update all uses to use the Triple off
echristo Oct 1, 2016
3e821f8
Revert "AMDGPU: Don't use offen if it is 0"
joker-eph Oct 1, 2016
67f335d
Use StringRef in Pass/PassManager APIs (NFC)
joker-eph Oct 1, 2016
5e07fb3
Use StringRef in TLI instead of raw pointer (NFC)
joker-eph Oct 1, 2016
798a8cd
Use StringRef instead of raw pointer in MachinePassRegistry (NFC)
joker-eph Oct 1, 2016
b7d8ee4
Use StringRef in CommandLine Options handling (NFC)
joker-eph Oct 1, 2016
6bd185b
Use StringRef in Pass Info/Support API (NFC)
joker-eph Oct 1, 2016
b398ca6
Use StringRef in Datalayout API (NFC)
joker-eph Oct 1, 2016
48435b0
Revert "Use StringRef in Datalayout API (NFC)"
joker-eph Oct 1, 2016
afe556b
DIFlags: use StringRef instead of raw pointer (NFC)
joker-eph Oct 1, 2016
0efcb40
Use StringRef in Datalayout API (NFC)
joker-eph Oct 1, 2016
dbe4e45
[AVX-512] Add VLX command lines to 128 and 256-bit shufffle tests.
topperc Oct 1, 2016
825f7d8
[AVX-512] Add EVEX versions of VPBROADCASTW patterns with truncated i…
topperc Oct 1, 2016
d1fa61b
Use StringRef instead of raw pointer in ExecutionEngine
joker-eph Oct 1, 2016
876fe65
Use StringRef instead of raw pointer in TargetRegistry API (NFC)
joker-eph Oct 1, 2016
ec52cde
Use StringRef instead of raw pointers in MCAsmInfo/MCInstrInfo APIs (…
joker-eph Oct 1, 2016
102077e
Revert "Use StringRef instead of raw pointer in TargetRegistry API (N…
joker-eph Oct 1, 2016
b800476
[X86] Cleanup patterns for using VMOVDDUP for broadcasts.
topperc Oct 1, 2016
1acd70c
[libFuzzer] fix a recent bugs (buffer overflow)
kcc Oct 1, 2016
a27efcd
Retire bugpoint's -R. hack.
jsonn Oct 1, 2016
83660ff
GC HAVE_STRTOQ
jsonn Oct 1, 2016
120924c
[libFuzzer] add fuzzer test for libxml2, finds https://bugzilla.gnome…
kcc Oct 1, 2016
1839f8a
Retire LLVM_BINDIR and friends. They haven't been provided with actual
jsonn Oct 1, 2016
962713f
Split a comment into generic description and note about the specific
jsonn Oct 1, 2016
bf7d569
[OCaml] Install .mli (interface) files
mgorny Oct 1, 2016
310d306
[cmake] Make LIT_COMMAND configurable and improve fallback support
mgorny Oct 1, 2016
c513af9
[cmake] Fix incorrect default for LIT_COMMAND, from r283029
mgorny Oct 1, 2016
6bc4743
Revert "[MC] Prevent out of order HashDirective lexing in AsmLexer."
niravhdave Oct 1, 2016
f2993f0
[X86][SSE] Regenerate vselect tests and improve AVX1/AVX2 coverage
RKSimon Oct 1, 2016
f4f5451
Revert r283029 - [cmake] Make LIT_COMMAND configurable and improve fa…
mgorny Oct 1, 2016
1c8d24e
[X86][SSE] Enable commutation from MOVSD/MOVSS to BLENDPD/BLENDPS on …
RKSimon Oct 1, 2016
55ce06a
[X86][SSE] Always combine target shuffles to MOVSD/MOVSS
RKSimon Oct 1, 2016
a8904db
Use StringRef in Registry API (NFC)
joker-eph Oct 1, 2016
20e8247
[X86][SSE] Add support for combining target shuffles to binary BLEND
RKSimon Oct 1, 2016
fc651f7
Fix signed/unsigned warning
RKSimon Oct 1, 2016
089e03e
[CostModel][X86] Added fabs costs
RKSimon Oct 1, 2016
793d2a4
Use StringRef for MemoryBuffer identifier API (NFC)
joker-eph Oct 1, 2016
1df457a
[CostModel][X86] Added fcopysign costs
RKSimon Oct 1, 2016
4a24b14
[SLPVectorizer][X86] Added fabs tests
RKSimon Oct 1, 2016
a94243b
[SLPVectorizer][X86] Added fcopysign tests
RKSimon Oct 1, 2016
065e592
[CostModel][X86] Added tests for current fptosi/fptoui costs
RKSimon Oct 1, 2016
1b14831
[SLPVectorizer][X86] Added fptosi/fptoui tests
RKSimon Oct 1, 2016
ec8ee2a
[X86][SSE] Cleaned up shuffle decode assertion messages
RKSimon Oct 1, 2016
d17dee5
COFF: Fix short import lib import name type bitshift
martell Oct 1, 2016
ca07d00
[SCEV] Remove commented out code; NFC
sanjoy Oct 2, 2016
4e4cf39
[ConstantRange] Make getEquivalentICmp smarter
sanjoy Oct 2, 2016
afbfbca
[SCEV] Rely on ConstantRange instead of custom logic; NFCI
sanjoy Oct 2, 2016
f6a95d4
Remove duplicated code; NFC
sanjoy Oct 2, 2016
4c305be
[PowerPC] Refactor soft-float support, and enable PPC64 soft float
Oct 2, 2016
d300098
Revert r283057 and r283058
sanjoy Oct 2, 2016
ca641f3
[X86] Fix indentation. NFC
topperc Oct 2, 2016
a8c3c60
[X86] Don't set i64 ADDC/ADDE/SUBC/SUBE as Custom if the target isn't…
topperc Oct 2, 2016
9d7b8dc
[X86][AVX] Ensure broadcast loads respect dependencies
RKSimon Oct 2, 2016
7e696f0
[x86] add test to show unnecessary scalarization of copysign intrinsi…
rotateright Oct 2, 2016
892bbf6
[x86] remove 'nan' strings from copysign assertions; NFC
rotateright Oct 2, 2016
c36f800
Rangify for loops.
yrnkrn Oct 2, 2016
bb9190f
[X86][AVX2] Fix typo in test names
RKSimon Oct 2, 2016
630a87a
[X86][AVX2] Missed opportunities to combine to VPERMD/VPERMPS
RKSimon Oct 2, 2016
53936b8
[ConstantRange] Make getEquivalentICmp smarter
sanjoy Oct 2, 2016
4f64dd9
[SCEV] Rely on ConstantRange instead of custom logic; NFCI
sanjoy Oct 2, 2016
a96fb08
[X86][AVX2] Add support for combining target shuffles to VPERMD/VPERMPS
RKSimon Oct 2, 2016
21dbd11
Merge branch 'amd-master' into kzhuravl-common
kzhuravl Oct 3, 2016
c38fe1f
Use StringRef in getPassName (NFC)
kzhuravl Oct 3, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 0 additions & 1 deletion cmake/config-ix.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,6 @@ check_symbol_exists(pread unistd.h HAVE_PREAD)
check_symbol_exists(realpath stdlib.h HAVE_REALPATH)
check_symbol_exists(sbrk unistd.h HAVE_SBRK)
check_symbol_exists(strtoll stdlib.h HAVE_STRTOLL)
check_symbol_exists(strtoq stdlib.h HAVE_STRTOQ)
check_symbol_exists(strerror string.h HAVE_STRERROR)
check_symbol_exists(strerror_r string.h HAVE_STRERROR_R)
check_symbol_exists(strerror_s string.h HAVE_DECL_STRERROR_S)
Expand Down
3 changes: 2 additions & 1 deletion cmake/modules/AddOCaml.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -180,10 +180,11 @@ function(add_ocaml_library name)

set(install_files)
set(install_shlibs)
foreach( ocaml_output ${ocaml_outputs} )
foreach( ocaml_output ${ocaml_inputs} ${ocaml_outputs} )
get_filename_component(ext "${ocaml_output}" EXT)

if( NOT (ext STREQUAL ".cmo" OR
ext STREQUAL ".ml" OR
ext STREQUAL CMAKE_C_OUTPUT_EXTENSION OR
ext STREQUAL CMAKE_SHARED_LIBRARY_SUFFIX) )
list(APPEND install_files "${ocaml_output}")
Expand Down
10 changes: 5 additions & 5 deletions include/llvm/ADT/Triple.h
Original file line number Diff line number Diff line change
Expand Up @@ -691,25 +691,25 @@ class Triple {
/// @{

/// getArchTypeName - Get the canonical name for the \p Kind architecture.
static const char *getArchTypeName(ArchType Kind);
static StringRef getArchTypeName(ArchType Kind);

/// getArchTypePrefix - Get the "prefix" canonical name for the \p Kind
/// architecture. This is the prefix used by the architecture specific
/// builtins, and is suitable for passing to \see
/// Intrinsic::getIntrinsicForGCCBuiltin().
///
/// \return - The architecture prefix, or 0 if none is defined.
static const char *getArchTypePrefix(ArchType Kind);
static StringRef getArchTypePrefix(ArchType Kind);

/// getVendorTypeName - Get the canonical name for the \p Kind vendor.
static const char *getVendorTypeName(VendorType Kind);
static StringRef getVendorTypeName(VendorType Kind);

/// getOSTypeName - Get the canonical name for the \p Kind operating system.
static const char *getOSTypeName(OSType Kind);
static StringRef getOSTypeName(OSType Kind);

/// getEnvironmentTypeName - Get the canonical name for the \p Kind
/// environment.
static const char *getEnvironmentTypeName(EnvironmentType Kind);
static StringRef getEnvironmentTypeName(EnvironmentType Kind);

/// @}
/// @name Static helpers for converting alternate architecture names.
Expand Down
4 changes: 1 addition & 3 deletions include/llvm/Analysis/LoopPass.h
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,7 @@ class LPPassManager : public FunctionPass, public PMDataManager {
// LPPassManager needs LoopInfo.
void getAnalysisUsage(AnalysisUsage &Info) const override;

const char *getPassName() const override {
return "Loop Pass Manager";
}
StringRef getPassName() const override { return "Loop Pass Manager"; }

PMDataManager *getAsPMDataManager() override { return this; }
Pass *getAsPass() override { return this; }
Expand Down
4 changes: 1 addition & 3 deletions include/llvm/Analysis/RegionPass.h
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,7 @@ class RGPassManager : public FunctionPass, public PMDataManager {
/// RGPassManager needs RegionInfo.
void getAnalysisUsage(AnalysisUsage &Info) const override;

const char *getPassName() const override {
return "Region Pass Manager";
}
StringRef getPassName() const override { return "Region Pass Manager"; }

PMDataManager *getAsPMDataManager() override { return this; }
Pass *getAsPass() override { return this; }
Expand Down
6 changes: 3 additions & 3 deletions include/llvm/Analysis/TargetLibraryInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ template <typename T> class ArrayRef;
/// Function 'VectorFnName' is equivalent to 'ScalarFnName' vectorized
/// by a factor 'VectorizationFactor'.
struct VecDesc {
const char *ScalarFnName;
const char *VectorFnName;
StringRef ScalarFnName;
StringRef VectorFnName;
unsigned VectorizationFactor;
};

Expand All @@ -50,7 +50,7 @@ class TargetLibraryInfoImpl {

unsigned char AvailableArray[(LibFunc::NumLibFuncs+3)/4];
llvm::DenseMap<unsigned, std::string> CustomNames;
static const char *const StandardNames[LibFunc::NumLibFuncs];
static StringRef const StandardNames[LibFunc::NumLibFuncs];

enum AvailabilityState {
StandardName = 3, // (memset to all ones)
Expand Down
3 changes: 0 additions & 3 deletions include/llvm/CodeGen/AsmPrinter.h
Original file line number Diff line number Diff line change
Expand Up @@ -172,9 +172,6 @@ class AsmPrinter : public MachineFunctionPass {

void EmitToStreamer(MCStreamer &S, const MCInst &Inst);

/// Return the target triple string.
StringRef getTargetTriple() const;

/// Return the current section we are emitting to.
const MCSection *getCurrentSection() const;

Expand Down
4 changes: 1 addition & 3 deletions include/llvm/CodeGen/GlobalISel/IRTranslator.h
Original file line number Diff line number Diff line change
Expand Up @@ -342,9 +342,7 @@ class IRTranslator : public MachineFunctionPass {
// Ctor, nothing fancy.
IRTranslator();

const char *getPassName() const override {
return "IRTranslator";
}
StringRef getPassName() const override { return "IRTranslator"; }

void getAnalysisUsage(AnalysisUsage &AU) const override;

Expand Down
2 changes: 1 addition & 1 deletion include/llvm/CodeGen/GlobalISel/InstructionSelect.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ namespace llvm {
class InstructionSelect : public MachineFunctionPass {
public:
static char ID;
const char *getPassName() const override { return "InstructionSelect"; }
StringRef getPassName() const override { return "InstructionSelect"; }

void getAnalysisUsage(AnalysisUsage &AU) const override;

Expand Down
4 changes: 1 addition & 3 deletions include/llvm/CodeGen/GlobalISel/MachineLegalizePass.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,7 @@ class MachineLegalizePass : public MachineFunctionPass {
// Ctor, nothing fancy.
MachineLegalizePass();

const char *getPassName() const override {
return "MachineLegalizePass";
}
StringRef getPassName() const override { return "MachineLegalizePass"; }

void getAnalysisUsage(AnalysisUsage &AU) const override;

Expand Down
4 changes: 1 addition & 3 deletions include/llvm/CodeGen/GlobalISel/RegBankSelect.h
Original file line number Diff line number Diff line change
Expand Up @@ -586,9 +586,7 @@ class RegBankSelect : public MachineFunctionPass {
/// Create a RegBankSelect pass with the specified \p RunningMode.
RegBankSelect(Mode RunningMode = Fast);

const char *getPassName() const override {
return "RegBankSelect";
}
StringRef getPassName() const override { return "RegBankSelect"; }

void getAnalysisUsage(AnalysisUsage &AU) const override;

Expand Down
16 changes: 8 additions & 8 deletions include/llvm/CodeGen/MachinePassRegistry.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ class MachinePassRegistryListener {
public:
MachinePassRegistryListener() {}
virtual ~MachinePassRegistryListener() {}
virtual void NotifyAdd(const char *N, MachinePassCtor C, const char *D) = 0;
virtual void NotifyRemove(const char *N) = 0;
virtual void NotifyAdd(StringRef N, MachinePassCtor C, StringRef D) = 0;
virtual void NotifyRemove(StringRef N) = 0;
};


Expand All @@ -52,8 +52,8 @@ class MachinePassRegistryNode {
private:

MachinePassRegistryNode *Next; // Next function pass in list.
const char *Name; // Name of function pass.
const char *Description; // Description string.
StringRef Name; // Name of function pass.
StringRef Description; // Description string.
MachinePassCtor Ctor; // Function pass creator.

public:
Expand All @@ -68,8 +68,8 @@ class MachinePassRegistryNode {
// Accessors
MachinePassRegistryNode *getNext() const { return Next; }
MachinePassRegistryNode **getNextAddress() { return &Next; }
const char *getName() const { return Name; }
const char *getDescription() const { return Description; }
StringRef getName() const { return Name; }
StringRef getDescription() const { return Description; }
MachinePassCtor getCtor() const { return Ctor; }
void setNext(MachinePassRegistryNode *N) { Next = N; }

Expand Down Expand Up @@ -143,10 +143,10 @@ class RegisterPassParser : public MachinePassRegistryListener,

// Implement the MachinePassRegistryListener callbacks.
//
void NotifyAdd(const char *N, MachinePassCtor C, const char *D) override {
void NotifyAdd(StringRef N, MachinePassCtor C, StringRef D) override {
this->addLiteralOption(N, (typename RegistryClass::FunctionPassCtor)C, D);
}
void NotifyRemove(const char *N) override {
void NotifyRemove(StringRef N) override {
this->removeLiteralOption(N);
}
};
Expand Down
33 changes: 2 additions & 31 deletions include/llvm/Config/config.h.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,6 @@
/* Define to 1 if you have the <link.h> header file. */
#cmakedefine HAVE_LINK_H ${HAVE_LINK_H}

/* Define if you can use -Wl,-R. to pass -R. to the linker, in order to add
the current directory to the dynamic linker search path. */
#undef HAVE_LINK_R

/* Define to 1 if you have the <mach/mach.h> header file. */
#cmakedefine HAVE_MACH_MACH_H ${HAVE_MACH_MACH_H}

Expand Down Expand Up @@ -205,9 +201,6 @@
/* Define to 1 if you have the `strtoll' function. */
#cmakedefine HAVE_STRTOLL ${HAVE_STRTOLL}

/* Define to 1 if you have the `strtoq' function. */
#cmakedefine HAVE_STRTOQ ${HAVE_STRTOQ}

/* Define to 1 if you have the `sysconf' function. */
#cmakedefine HAVE_SYSCONF ${HAVE_SYSCONF}

Expand Down Expand Up @@ -336,20 +329,10 @@
/* Define if we link Polly to the tools */
#cmakedefine LINK_POLLY_INTO_TOOLS

/* Installation directory for binary executables */
#cmakedefine LLVM_BINDIR "${LLVM_BINDIR}"

/* Installation directory for data files */
#cmakedefine LLVM_DATADIR "${LLVM_DATADIR}"

/* Target triple LLVM will generate code for by default
* Doesn't use `cmakedefine` because it is allowed to be empty.
*/
/* Target triple LLVM will generate code for by default */
/* Doesn't use `cmakedefine` because it is allowed to be empty. */
#define LLVM_DEFAULT_TARGET_TRIPLE "${LLVM_DEFAULT_TARGET_TRIPLE}"

/* Installation directory for documentation */
#cmakedefine LLVM_DOCSDIR "${LLVM_DOCSDIR}"

/* Define to enable checks that alter the LLVM C++ ABI */
#cmakedefine01 LLVM_ENABLE_ABI_BREAKING_CHECKS

Expand All @@ -359,24 +342,12 @@
/* Define if zlib compression is available */
#cmakedefine01 LLVM_ENABLE_ZLIB

/* Installation directory for config files */
#cmakedefine LLVM_ETCDIR "${LLVM_ETCDIR}"

/* Has gcc/MSVC atomic intrinsics */
#cmakedefine01 LLVM_HAS_ATOMICS

/* Host triple LLVM will be executed on */
#cmakedefine LLVM_HOST_TRIPLE "${LLVM_HOST_TRIPLE}"

/* Installation directory for include files */
#cmakedefine LLVM_INCLUDEDIR "${LLVM_INCLUDEDIR}"

/* Installation directory for .info files */
#cmakedefine LLVM_INFODIR "${LLVM_INFODIR}"

/* Installation directory for man pages */
#cmakedefine LLVM_MANDIR "${LLVM_MANDIR}"

/* LLVM architecture name for the native architecture, if available */
#cmakedefine LLVM_NATIVE_ARCH ${LLVM_NATIVE_ARCH}

Expand Down
21 changes: 0 additions & 21 deletions include/llvm/Config/llvm-config.h.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -17,42 +17,21 @@
/* Define if we link Polly to the tools */
#cmakedefine LINK_POLLY_INTO_TOOLS

/* Installation directory for binary executables */
#cmakedefine LLVM_BINDIR "${LLVM_BINDIR}"

/* Installation directory for data files */
#cmakedefine LLVM_DATADIR "${LLVM_DATADIR}"

/* Target triple LLVM will generate code for by default */
#cmakedefine LLVM_DEFAULT_TARGET_TRIPLE "${LLVM_DEFAULT_TARGET_TRIPLE}"

/* Installation directory for documentation */
#cmakedefine LLVM_DOCSDIR "${LLVM_DOCSDIR}"

/* Define to enable checks that alter the LLVM C++ ABI */
#cmakedefine01 LLVM_ENABLE_ABI_BREAKING_CHECKS

/* Define if threads enabled */
#cmakedefine01 LLVM_ENABLE_THREADS

/* Installation directory for config files */
#cmakedefine LLVM_ETCDIR "${LLVM_ETCDIR}"

/* Has gcc/MSVC atomic intrinsics */
#cmakedefine01 LLVM_HAS_ATOMICS

/* Host triple LLVM will be executed on */
#cmakedefine LLVM_HOST_TRIPLE "${LLVM_HOST_TRIPLE}"

/* Installation directory for include files */
#cmakedefine LLVM_INCLUDEDIR "${LLVM_INCLUDEDIR}"

/* Installation directory for .info files */
#cmakedefine LLVM_INFODIR "${LLVM_INFODIR}"

/* Installation directory for man pages */
#cmakedefine LLVM_MANDIR "${LLVM_MANDIR}"

/* LLVM architecture name for the native architecture, if available */
#cmakedefine LLVM_NATIVE_ARCH ${LLVM_NATIVE_ARCH}

Expand Down
4 changes: 2 additions & 2 deletions include/llvm/ExecutionEngine/ExecutionEngine.h
Original file line number Diff line number Diff line change
Expand Up @@ -205,12 +205,12 @@ class ExecutionEngine {
/// FindFunctionNamed - Search all of the active modules to find the function that
/// defines FnName. This is very slow operation and shouldn't be used for
/// general code.
virtual Function *FindFunctionNamed(const char *FnName);
virtual Function *FindFunctionNamed(StringRef FnName);

/// FindGlobalVariableNamed - Search all of the active modules to find the global variable
/// that defines Name. This is very slow operation and shouldn't be used for
/// general code.
virtual GlobalVariable *FindGlobalVariableNamed(const char *Name, bool AllowInternal = false);
virtual GlobalVariable *FindGlobalVariableNamed(StringRef Name, bool AllowInternal = false);

/// runFunction - Execute the specified function with the specified arguments,
/// and return the result.
Expand Down
2 changes: 1 addition & 1 deletion include/llvm/ExecutionEngine/ObjectMemoryBuffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class ObjectMemoryBuffer : public MemoryBuffer {
init(this->SV.begin(), this->SV.end(), false);
}

const char* getBufferIdentifier() const override { return BufferName.c_str(); }
StringRef getBufferIdentifier() const override { return BufferName; }

BufferKind getBufferKind() const override { return MemoryBuffer_Malloc; }

Expand Down
8 changes: 8 additions & 0 deletions include/llvm/IR/ConstantRange.h
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,14 @@ class ConstantRange {
return nullptr;
}

/// If this set contains all but a single element, return it, otherwise return
/// null.
const APInt *getSingleMissingElement() const {
if (Lower == Upper + 1)
return &Upper;
return nullptr;
}

/// Return true if this set contains exactly one member.
///
bool isSingleElement() const { return getSingleElement() != nullptr; }
Expand Down
4 changes: 2 additions & 2 deletions include/llvm/IR/DataLayout.h
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ class DataLayout {

bool hasLinkerPrivateGlobalPrefix() const { return ManglingMode == MM_MachO; }

const char *getLinkerPrivateGlobalPrefix() const {
StringRef getLinkerPrivateGlobalPrefix() const {
if (ManglingMode == MM_MachO)
return "l";
return "";
Expand All @@ -281,7 +281,7 @@ class DataLayout {
llvm_unreachable("invalid mangling mode");
}

const char *getPrivateGlobalPrefix() const {
StringRef getPrivateGlobalPrefix() const {
switch (ManglingMode) {
case MM_None:
return "";
Expand Down
2 changes: 1 addition & 1 deletion include/llvm/IR/DebugInfoMetadata.h
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ class DINode : public MDNode {
};

static DIFlags getFlag(StringRef Flag);
static const char *getFlagString(DIFlags Flag);
static StringRef getFlagString(DIFlags Flag);

/// \brief Split up a flags bitfield.
///
Expand Down
2 changes: 1 addition & 1 deletion include/llvm/IR/DiagnosticInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@ class DiagnosticInfoOptimizationBase : public DiagnosticInfoWithDebugLocBase {
/// in BackendConsumer::OptimizationRemarkHandler).
virtual bool isEnabled() const = 0;

const char *getPassName() const { return PassName; }
StringRef getPassName() const { return PassName; }
std::string getMsg() const;
Optional<uint64_t> getHotness() const { return Hotness; }
void setHotness(Optional<uint64_t> H) { Hotness = H; }
Expand Down
4 changes: 0 additions & 4 deletions include/llvm/IR/Instructions.h
Original file line number Diff line number Diff line change
Expand Up @@ -1212,10 +1212,6 @@ class ICmpInst: public CmpInst {
return !isEquality(P);
}

/// Initialize a set of values that all satisfy the predicate with C.
/// Make a ConstantRange for a relation with a constant value.
static ConstantRange makeConstantRange(Predicate pred, const APInt &C);

/// Exchange the two operands to this instruction in such a way that it does
/// not modify the semantics of the instruction. The predicate value may be
/// changed to retain the same result if the predicate is order dependent
Expand Down
Loading