mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-15 21:24:00 +00:00
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
This commit is contained in:
@ -37,7 +37,6 @@
|
|||||||
#include "llvm/ADT/SmallPtrSet.h"
|
#include "llvm/ADT/SmallPtrSet.h"
|
||||||
#include "llvm/ADT/SmallSet.h"
|
#include "llvm/ADT/SmallSet.h"
|
||||||
#include "llvm/ADT/STLExtras.h"
|
#include "llvm/ADT/STLExtras.h"
|
||||||
#include "llvm/Config/alloca.h"
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
using namespace llvm;
|
using namespace llvm;
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
//=== is guaranteed to work on *all* UNIX variants.
|
//=== is guaranteed to work on *all* UNIX variants.
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
#include "llvm/Config/alloca.h"
|
#include "llvm/ADT/SmallVector.h"
|
||||||
#include "Unix.h"
|
#include "Unix.h"
|
||||||
#if HAVE_SYS_STAT_H
|
#if HAVE_SYS_STAT_H
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
@ -400,7 +400,9 @@ Path::getSuffix() const {
|
|||||||
|
|
||||||
bool Path::getMagicNumber(std::string& Magic, unsigned len) const {
|
bool Path::getMagicNumber(std::string& Magic, unsigned len) const {
|
||||||
assert(len < 1024 && "Request for magic string too long");
|
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);
|
int fd = ::open(path.c_str(), O_RDONLY);
|
||||||
if (fd < 0)
|
if (fd < 0)
|
||||||
return false;
|
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,
|
// Append an XXXXXX pattern to the end of the file for use with mkstemp,
|
||||||
// mktemp or our own implementation.
|
// 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());
|
path.copy(FNBuffer,path.size());
|
||||||
if (isDirectory())
|
if (isDirectory())
|
||||||
strcpy(FNBuffer+path.size(), "/XXXXXX");
|
strcpy(FNBuffer+path.size(), "/XXXXXX");
|
||||||
|
@ -19,7 +19,6 @@
|
|||||||
#include "ARMSubtarget.h"
|
#include "ARMSubtarget.h"
|
||||||
#include "llvm/Function.h"
|
#include "llvm/Function.h"
|
||||||
#include "llvm/CodeGen/JITCodeEmitter.h"
|
#include "llvm/CodeGen/JITCodeEmitter.h"
|
||||||
#include "llvm/Config/alloca.h"
|
|
||||||
#include "llvm/Support/Debug.h"
|
#include "llvm/Support/Debug.h"
|
||||||
#include "llvm/Support/ErrorHandling.h"
|
#include "llvm/Support/ErrorHandling.h"
|
||||||
#include "llvm/Support/raw_ostream.h"
|
#include "llvm/Support/raw_ostream.h"
|
||||||
|
@ -16,7 +16,6 @@
|
|||||||
#include "AlphaRelocations.h"
|
#include "AlphaRelocations.h"
|
||||||
#include "llvm/Function.h"
|
#include "llvm/Function.h"
|
||||||
#include "llvm/CodeGen/JITCodeEmitter.h"
|
#include "llvm/CodeGen/JITCodeEmitter.h"
|
||||||
#include "llvm/Config/alloca.h"
|
|
||||||
#include "llvm/Support/Debug.h"
|
#include "llvm/Support/Debug.h"
|
||||||
#include "llvm/Support/ErrorHandling.h"
|
#include "llvm/Support/ErrorHandling.h"
|
||||||
#include "llvm/Support/raw_ostream.h"
|
#include "llvm/Support/raw_ostream.h"
|
||||||
|
@ -16,7 +16,6 @@
|
|||||||
#include "X86Relocations.h"
|
#include "X86Relocations.h"
|
||||||
#include "X86Subtarget.h"
|
#include "X86Subtarget.h"
|
||||||
#include "llvm/Function.h"
|
#include "llvm/Function.h"
|
||||||
#include "llvm/Config/alloca.h"
|
|
||||||
#include "llvm/Support/Compiler.h"
|
#include "llvm/Support/Compiler.h"
|
||||||
#include "llvm/Support/ErrorHandling.h"
|
#include "llvm/Support/ErrorHandling.h"
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
|
Reference in New Issue
Block a user