Skip to content

Commit 33224b2

Browse files
authored
Use the same cc extension for C++ files (#11881)
* Use the same `cc` extension for C++ files Rename a few stragglers using `*.cpp` to `*.cc` to have consistent syntax throughout the repository. * Fix another reference * Rename more extensions
1 parent 372e832 commit 33224b2

File tree

9 files changed

+10
-10
lines changed

9 files changed

+10
-10
lines changed

crates/test-programs/artifacts/build.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ impl Artifacts {
249249
let name = path.file_stem().unwrap().to_str().unwrap().to_owned();
250250
match path.extension().and_then(|s| s.to_str()) {
251251
// Compile C/C++ tests with clang
252-
Some("c") | Some("cpp") | Some("cc") => self.build_c_or_cpp_test(path, name, tests),
252+
Some("c") | Some("cc") => self.build_c_or_cpp_test(path, name, tests),
253253

254254
// just a header, part of another test.
255255
Some("h") => {}

crates/test-programs/src/bin/dwarf_codegen_optimized.cpp renamed to crates/test-programs/src/bin/dwarf_codegen_optimized.cc

File renamed without changes.

crates/test-programs/src/bin/dwarf_codegen_optimized_wasm_optimized.cpp renamed to crates/test-programs/src/bin/dwarf_codegen_optimized_wasm_optimized.cc

File renamed without changes.

crates/test-programs/src/bin/dwarf_generic.cpp renamed to crates/test-programs/src/bin/dwarf_generic.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//! extra-files = ['dwarf_generic_satellite.cpp']
1+
//! extra-files = ['dwarf_generic_satellite.cc']
22

33
// clang-format off
44
// clang -o generic.wasm -target wasm32-unknown-wasip1 -g generic.cpp generic-satellite.cpp

crates/test-programs/src/bin/dwarf_generic_satellite.cpp renamed to crates/test-programs/src/bin/dwarf_generic_satellite.cc

File renamed without changes.

docs/examples-async.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
You can also [browse this source code online][code] and clone the wasmtime
44
repository to run the example locally.
55

6-
[code]: https://github.com/bytecodealliance/wasmtime/blob/main/examples/async.cpp
6+
[code]: https://github.com/bytecodealliance/wasmtime/blob/main/examples/async.cc
77

88
This example demonstrates configuring Wasmtime for asynchronous operation and calling async host functions from wasm.
99

@@ -18,7 +18,7 @@ This example demonstrates configuring Wasmtime for asynchronous operation and ca
1818
<!-- langtabs-start -->
1919

2020
```cpp
21-
{{#include ../examples/async.cpp}}
21+
{{#include ../examples/async.cc}}
2222
```
2323
2424
<!-- langtabs-end -->

examples/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ create_rust_wasm(resource-component wasm32-wasip2)
6363
# C/C++ examples/tests
6464
create_target(anyref anyref.c)
6565
create_target(anyref-cpp anyref.cc)
66-
create_target(async async.cpp)
66+
create_target(async async.cc)
6767
create_target(externref externref.c)
6868
create_target(externref-cpp externref.cc)
6969
create_target(fib-debug fib-debug/main.c)
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ function.
55
You can compile and run this example on Linux with:
66
77
cargo build --release -p wasmtime-c-api
8-
c++ examples/async.cpp \
8+
c++ examples/async.cc \
99
-I crates/c-api/include \
1010
target/release/libwasmtime.a \
1111
-std=c++11 \

tests/all/native_debug/lldb.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -262,8 +262,8 @@ pub fn dwarf_codegen_optimized() -> Result<()> {
262262
],
263263
r#"b InitializeTest
264264
r
265-
b dwarf_codegen_optimized.cpp:25
266-
b dwarf_codegen_optimized.cpp:26
265+
b dwarf_codegen_optimized.cc:25
266+
b dwarf_codegen_optimized.cc:26
267267
c
268268
v x
269269
c
@@ -297,8 +297,8 @@ pub fn dwarf_codegen_optimized_wasm_optimized() -> Result<()> {
297297
],
298298
r#"b InitializeTest
299299
r
300-
b dwarf_codegen_optimized_wasm_optimized.cpp:23
301-
b dwarf_codegen_optimized_wasm_optimized.cpp:29
300+
b dwarf_codegen_optimized_wasm_optimized.cc:23
301+
b dwarf_codegen_optimized_wasm_optimized.cc:29
302302
c
303303
v b
304304
c

0 commit comments

Comments
 (0)