summaryrefslogtreecommitdiffstats
path: root/lldb/source/Host/linux
diff options
context:
space:
mode:
authorJonas Devlieghere <jonas@devlieghere.com>2018-11-12 21:24:50 +0000
committerJonas Devlieghere <jonas@devlieghere.com>2018-11-12 21:24:50 +0000
commit87e403aa4f62d7385999041abce5fdadb8741a47 (patch)
tree50a1ddaec65b06269d32c1455915f0fd4340f41e /lldb/source/Host/linux
parente565e5a9621de42e7b82ad50803fe03beafa0334 (diff)
downloadbcm5719-llvm-87e403aa4f62d7385999041abce5fdadb8741a47.tar.gz
bcm5719-llvm-87e403aa4f62d7385999041abce5fdadb8741a47.zip
Re-land "Extract construction of DataBufferLLVM into FileSystem"
This fixes some UB in isLocal detected by the sanitized bot. llvm-svn: 346707
Diffstat (limited to 'lldb/source/Host/linux')
-rw-r--r--lldb/source/Host/linux/Host.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/lldb/source/Host/linux/Host.cpp b/lldb/source/Host/linux/Host.cpp
index 1008706bd13..bd596f8cbfe 100644
--- a/lldb/source/Host/linux/Host.cpp
+++ b/lldb/source/Host/linux/Host.cpp
@@ -28,7 +28,6 @@
#include "lldb/Host/Host.h"
#include "lldb/Host/HostInfo.h"
#include "lldb/Host/linux/Support.h"
-#include "lldb/Utility/DataBufferLLVM.h"
#include "lldb/Utility/DataExtractor.h"
using namespace lldb;
@@ -122,7 +121,7 @@ static bool IsDirNumeric(const char *dname) {
static ArchSpec GetELFProcessCPUType(llvm::StringRef exe_path) {
Log *log = GetLogIfAllCategoriesSet(LIBLLDB_LOG_HOST);
- auto buffer_sp = DataBufferLLVM::CreateSliceFromPath(exe_path, 0x20, 0);
+ auto buffer_sp = FileSystem::Instance().CreateDataBuffer(exe_path, 0x20, 0);
if (!buffer_sp)
return ArchSpec();
OpenPOWER on IntegriCloud