Skip to content

Commit 07c6e58

Browse files
committed
Revert cpp2rust to master version
1 parent a0a8802 commit 07c6e58

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

cpp2rust/cpp2rust.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
11
// Copyright (c) 2022-present INESC-ID.
22
// Distributed under the MIT license that can be found in the LICENSE file.
33

4-
#include <llvm/Support/CommandLine.h>
5-
64
#include <algorithm>
75
#include <array>
86
#include <cstdlib>
97
#include <filesystem>
108
#include <fstream>
119
#include <vector>
12-
1310
#if defined(_WIN32)
1411
#include <windows.h>
1512
#elif defined(__linux__)
@@ -19,6 +16,8 @@
1916
#include <mach-o/dyld.h>
2017
#endif
2118

19+
#include <llvm/Support/CommandLine.h>
20+
2221
#include "cpp2rust_lib.h"
2322
#include "logging.h"
2423

@@ -66,6 +65,7 @@ llvm::cl::list<std::string> CXXFlags("cxxflags",
6665

6766
} // namespace
6867

68+
// Get the directory of the running executable
6969
static fs::path GetExecutableDir() {
7070
#if defined(_WIN32)
7171
char path[MAX_PATH];
@@ -78,7 +78,7 @@ static fs::path GetExecutableDir() {
7878
.parent_path();
7979
#elif defined(__APPLE__)
8080
uint32_t size = 0;
81-
_NSGetExecutablePath(nullptr, &size);
81+
_NSGetExecutablePath(nullptr, &size); // get path length
8282
std::vector<char> buffer(size);
8383
_NSGetExecutablePath(buffer.data(), &size);
8484
return fs::path(buffer.data()).parent_path();

0 commit comments

Comments
 (0)