[PATCH] Verify source files for a module only once during the build
Argyrios Kyrtzidis
kyrtzidis at apple.com
Tue Feb 11 18:49:39 PST 2014
On Feb 10, 2014, at 6:28 AM, Dmitri Gribenko <gribozavr at gmail.com> wrote:
> Hi,
>
> Updated patch attached. Changes:
>
> - Fixed a bug where we would verify system headers if the build
> session timestamp is not provided.
> - Separated the build session timestamp into a separate option. It
> might have other uses in future.
> - Added tests for the driver.
> - Added libclang API to get the correct build session timestamp so
> that clients can be sure that they get it right, instead of rolling
> their own implementation.
>
> Please review.
+/**
+ * \brief Return the timestamp for use with Clang's
+ * \c -fbuild-session-timestamp= option.
+ */
+CINDEX_LINKAGE unsigned long long clang_getBuildSessionTimestamp(void);
You should bump the libclang API version.
+// RUN: find %t/modules-cache -name Foo.pcm | xargs -I {} cp {} %t/modules-to-compare/Foo-before.pcm
You can use “-fdisable-module-hash” to get a predictable path to the module file, the file will be at %t/modules-cache/Foo.pcm
Otherwise, LGTM!
>
> Dmitri
>
> --
> main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
> (j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr at gmail.com>*/
> <optimize-module-verification-v4.patch>_______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
More information about the cfe-commits
mailing list