=?utf-8?q?Balázs_Kéri?= <[email protected]>,
=?utf-8?q?Balázs_Kéri?= <[email protected]>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/[email protected]>


================
@@ -0,0 +1,43 @@
+// RUN: rm -rf %t
+// RUN: mkdir -p %t
+// RUN: split-file %s %t
+
+// RUN: %clang_cc1 -emit-pch -o %t/import.c.ast %t/import.c
+
+// RUN: %clang_extdef_map -- -x c %t/import.c >> %t/externalDefMap.txt
+// RUN: sed -i'' 's/$/.ast/' %t/externalDefMap.txt
----------------
dyung wrote:

>From 
>[this](https://stackoverflow.com/questions/4247068/sed-command-with-i-option-failing-on-mac-but-works-on-linux)
> page it might not be able to make a portable command line that replaces the 
>file in-place with no backup that works on linux and MacOS.

If you are okay with creating an extra file in the test directory, one of the 
suggestions on that page seems to work:
```
// RUN: sed -i='' -e 's/$/.ast/' %t/externalDefMap.txt
```
This creates a file `externalDefMap.txt=`, but does seem to work on linux and 
MacOS.

https://github.com/llvm/llvm-project/pull/156056
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to