File tree Expand file tree Collapse file tree 5 files changed +14
-4
lines changed Expand file tree Collapse file tree 5 files changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -98,6 +98,14 @@ namespace Paths {
98
98
return result;
99
99
}
100
100
101
+ std::string mangleExtensions (const fs::path& path) {
102
+ if (!path.has_extension ()) {
103
+ return path.string ();
104
+ }
105
+ fs::path extension = path.extension ();
106
+ return mangleExtensions (removeExtension (path)) + mangle (extension);
107
+ }
108
+
101
109
fs::path subtractPath (std::string path1, std::string path2) {
102
110
if (path2 == " ." ) {
103
111
return path1;
Original file line number Diff line number Diff line change @@ -124,6 +124,8 @@ namespace Paths {
124
124
125
125
std::string mangle (const fs::path& path);
126
126
127
+ std::string mangleExtensions (const fs::path& path);
128
+
127
129
static inline fs::path addOrigExtensionAsSuffixAndAddNew (const fs::path &path,
128
130
const std::string &newExt) {
129
131
std::string extensionAsSuffix = path.extension ().string ();
Original file line number Diff line number Diff line change @@ -305,7 +305,7 @@ void SourceToHeaderMatchCallback::generateWrapper(const VarDecl *decl) const {
305
305
policy.SuppressInitializers = 1 ;
306
306
307
307
/*
308
- * get_var_wrapper {
308
+ * get_pointer_to_var_wrapper {
309
309
* return &var;
310
310
* }
311
311
*/
Original file line number Diff line number Diff line change @@ -415,8 +415,8 @@ namespace printer {
415
415
artifacts.push_back (getRelativePath (testExecutablePath));
416
416
}
417
417
fs::path NativeMakefilePrinter::getTestExecutablePath (const fs::path &sourcePath) const {
418
- return Paths::removeExtension (
419
- Paths::removeExtension ( Paths::getRecompiledFile (testGen-> projectContext , sourcePath)) );
418
+ fs::path recompiledFile = Paths::getRecompiledFile (testGen-> projectContext , sourcePath);
419
+ return Paths::mangleExtensions (recompiledFile );
420
420
}
421
421
422
422
NativeMakefilePrinter::NativeMakefilePrinter (const NativeMakefilePrinter &baseMakefilePrinter,
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ namespace PrinterUtils {
23
23
}
24
24
25
25
std::string getterName (const std::string &wrapperName) {
26
- return " get_ " + wrapperName;
26
+ return " get_pointer_to_ " + wrapperName;
27
27
}
28
28
29
29
std::string getterDecl (const std::string &returnTypeName,
You can’t perform that action at this time.
0 commit comments