hidl-gen: add FIXME to comments for -Lc++-impl
A lot of people are including/using this method unnecessarily. I'm
adding a note here so that people think about this before code
review.
Test: test_hidl_impl
Note, this is the test I use for simple changes like this:
function test_hidl_impl() {
echo "Note: doing stuff in hardware/interfaces"
hidl-gen -o hardware/interfaces/foo -Lc++-impl -r android.hardware:hardware/interfaces -r android.hidl:system/libhidl/transport android.hardware.tests.foo@1.0
hidl-gen -o hardware/interfaces/foo -Landroidbp-impl -r android.hardware:hardware/interfaces -r android.hidl:system/libhidl/transport android.hardware.tests.foo@1.0
sed hardware/interfaces/foo/Android.bp -i -e "s/-impl/-impl-asdf/g"
m android.hardware.tests.foo@1.0-impl-asdf
}
Change-Id: I127e51238c3008f9b93ee1b8912641b133b98d87
diff --git a/generateCppImpl.cpp b/generateCppImpl.cpp
index 1ca899a..95b09a4 100644
--- a/generateCppImpl.cpp
+++ b/generateCppImpl.cpp
@@ -185,7 +185,8 @@
out << "};\n\n";
- out << "extern \"C\" "
+ out << "// FIXME: most likely delete, this is only for passthrough implementations\n"
+ << "// extern \"C\" "
<< ifaceName
<< "* ";
generateFetchSymbol(out, ifaceName);
@@ -238,6 +239,7 @@
return err;
}
+ out.setLinePrefix("//");
out << ifaceName
<< "* ";
generateFetchSymbol(out, ifaceName);
@@ -246,6 +248,7 @@
out << "return new " << baseName << "();\n";
out.unindent();
out << "}\n\n";
+ out.unsetLinePrefix();
out << "} // namespace implementation\n";
enterLeaveNamespace(out, false /* leave */);