aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-08-23 22:57:38 +0000
committerChris Lattner <sabre@nondot.org>2009-08-23 22:57:38 +0000
commit8755dee89ba6ae78f867a5f117212b569c2681fb (patch)
tree062268685658dd0ec8a761fcc5ac016f0202ff5e
parent890cd9ffb06d50739b91227efc862650b35a9c13 (diff)
downloadexternal_llvm-8755dee89ba6ae78f867a5f117212b569c2681fb.zip
external_llvm-8755dee89ba6ae78f867a5f117212b569c2681fb.tar.gz
external_llvm-8755dee89ba6ae78f867a5f117212b569c2681fb.tar.bz2
remove the last uses of Config/alloca.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79873 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/CodeGen/LiveVariables.cpp1
-rw-r--r--lib/System/Unix/Path.inc10
-rw-r--r--lib/Target/ARM/ARMJITInfo.cpp1
-rw-r--r--lib/Target/Alpha/AlphaJITInfo.cpp1
-rw-r--r--lib/Target/X86/X86JITInfo.cpp1
5 files changed, 7 insertions, 7 deletions
diff --git a/lib/CodeGen/LiveVariables.cpp b/lib/CodeGen/LiveVariables.cpp
index 626a76e..2da1be9 100644
--- a/lib/CodeGen/LiveVariables.cpp
+++ b/lib/CodeGen/LiveVariables.cpp
@@ -37,7 +37,6 @@
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/ADT/SmallSet.h"
#include "llvm/ADT/STLExtras.h"
-#include "llvm/Config/alloca.h"
#include <algorithm>
using namespace llvm;
diff --git a/lib/System/Unix/Path.inc b/lib/System/Unix/Path.inc
index 7139f4e..d7aa711 100644
--- a/lib/System/Unix/Path.inc
+++ b/lib/System/Unix/Path.inc
@@ -16,7 +16,7 @@
//=== is guaranteed to work on *all* UNIX variants.
//===----------------------------------------------------------------------===//
-#include "llvm/Config/alloca.h"
+#include "llvm/ADT/SmallVector.h"
#include "Unix.h"
#if HAVE_SYS_STAT_H
#include <sys/stat.h>
@@ -400,7 +400,9 @@ Path::getSuffix() const {
bool Path::getMagicNumber(std::string& Magic, unsigned len) const {
assert(len < 1024 && "Request for magic string too long");
- char* buf = (char*) alloca(1 + len);
+ SmallVector<char, 128> Buf;
+ Buf.resize(1 + len);
+ char* buf = Buf.data();
int fd = ::open(path.c_str(), O_RDONLY);
if (fd < 0)
return false;
@@ -829,7 +831,9 @@ Path::makeUnique(bool reuse_current, std::string* ErrMsg) {
// Append an XXXXXX pattern to the end of the file for use with mkstemp,
// mktemp or our own implementation.
- char *FNBuffer = (char*) alloca(path.size()+8);
+ SmallVector<char, 128> Buf;
+ Buf.resize(path.size()+8);
+ char *FNBuffer = Buf.data();
path.copy(FNBuffer,path.size());
if (isDirectory())
strcpy(FNBuffer+path.size(), "/XXXXXX");
diff --git a/lib/Target/ARM/ARMJITInfo.cpp b/lib/Target/ARM/ARMJITInfo.cpp
index 56dce5f..0456f33 100644
--- a/lib/Target/ARM/ARMJITInfo.cpp
+++ b/lib/Target/ARM/ARMJITInfo.cpp
@@ -19,7 +19,6 @@
#include "ARMSubtarget.h"
#include "llvm/Function.h"
#include "llvm/CodeGen/JITCodeEmitter.h"
-#include "llvm/Config/alloca.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/raw_ostream.h"
diff --git a/lib/Target/Alpha/AlphaJITInfo.cpp b/lib/Target/Alpha/AlphaJITInfo.cpp
index 33174a7..d328135 100644
--- a/lib/Target/Alpha/AlphaJITInfo.cpp
+++ b/lib/Target/Alpha/AlphaJITInfo.cpp
@@ -16,7 +16,6 @@
#include "AlphaRelocations.h"
#include "llvm/Function.h"
#include "llvm/CodeGen/JITCodeEmitter.h"
-#include "llvm/Config/alloca.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/raw_ostream.h"
diff --git a/lib/Target/X86/X86JITInfo.cpp b/lib/Target/X86/X86JITInfo.cpp
index dea34a5..5c3d101 100644
--- a/lib/Target/X86/X86JITInfo.cpp
+++ b/lib/Target/X86/X86JITInfo.cpp
@@ -16,7 +16,6 @@
#include "X86Relocations.h"
#include "X86Subtarget.h"
#include "llvm/Function.h"
-#include "llvm/Config/alloca.h"
#include "llvm/Support/Compiler.h"
#include "llvm/Support/ErrorHandling.h"
#include <cstdlib>